Repository navigation
Classify per-species loci in fetch and always emit the scaffold in FASTA headers - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes behavior where scaffolds for non-reference species were silently dropped from FASTA headers.
Scaffold is always in FASTA headers. It previously lived only in an internal dict key, so
--fasta-dedupe most-seqor--expected-speciesdiscarded it so it can't be resolved to a position in a multi-scaffold genome. Records spanning several source sequences now comma-join them rather than silently naming one.Per-element classification in
maf_fetch_summary.tsv(12 new columns, always written, MAF or FASTA): how many species are a clean single locus vs split / multi_scaffold / multi_strand / no_bases, plus the extent and concentration of the splits.Opt-in
--loci-tablewrites per-(element, species, block) rows with each species' source scaffold, MAF-frame coordinates and srcSize, so a per-species BED is a filter away.Reference-side columns renamed ref.n.overlapping.blocks / ref.block.bases, and interblock.distances removed. It was structurally all zeros and invited being read as a per-species contiguity check. The check survives as a ref-coverage-gap warning.
Crash fix:
-fh species-coords-idwith a 3-column BED raisedUnboundLocalError.Why classification rather than just fixing the header: MAF blocks are contiguous in the reference only, so a stitched non-reference row can be several pieces from different places, and the header's span is a bounding box. On real data 88.5% of (element, species) pairs are genuinely one locus; the rest aren't, and now say so.
Breaking: the summary schema changed (a column removed, two renamed, 12 added), so positional parsers need updating. Per-region .maf/.fa output is byte-identical to v0.5.0 across all 14 tested configurations. 137 tests passing.
🤖 Generated with Claude Code