Repository navigation
Conversation
A malformed or truncated GTF that yields zero genes used to log a WARN and carry on, so the run died later in count_reads with a "Chromosome name mismatch" error, an empty "GTF chromosomes (first 5):" list and a chromosome_mapping suggestion with nothing in it. The real cause (bad annotation file) was buried in an easy-to-miss warning above. parse_gtf now tracks why nothing was extracted and returns a fatal, actionable error naming the most likely cause: no annotation lines, lines with fewer than the 9 mandatory columns, no exon features (listing the feature types actually present, which flags GFF3 input), or exon features without gene_id attributes. count_reads keeps a guard for library callers: an empty annotation index now reports an empty-annotation error instead of the chromosome-mismatch diagnosis, which cannot apply when there is nothing to match against. Closes seqeralabs#126 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…mosome names When mapped reads exist but none lands in a gene, `count_reads` reports "Chromosome name mismatch" without comparing names. These tests fail where the BAM and GTF share a name (directly, or through chromosome_prefix) and keep the mismatch message for disjoint names. All three expect a non-zero exit: whether to abort on this input is a separate question. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… overlap When mapped reads exist but none is assigned to a gene, check whether any alignment chromosome (after chromosome_prefix / chromosome_mapping) is a GTF chromosome. If one is, report that no reads could be assigned to any gene instead of "Chromosome name mismatch" and its chromosome_mapping advice. The run still fails in both cases; only the diagnostic changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Avoid claiming no physical overlap when strandedness rejects overlapping reads. Preserve error exits and chromosome-name diagnostics. Add a wrong-strand overlap regression with a successful unstranded control.
This was referenced Dec 3, 2026
This branch has not been deployed
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.
Benjamin's #132 and Nico's #176 rebased onto current main (post-noodles) as one PR, since both change the same "no reads assigned to any gene" error in
counting.rsand would conflict with each other as two PRs. Each author's commits are kept as they were:be83e6e): a GTF that yields no genes fails at parse time with a GTF-specific reason (empty file, wrong column count, GFF3/noexonfeatures, missinggene_id), plus a guard so an empty annotation is not reported as a chromosome name mismatch.50d504b,e9292d7,3890228): "Chromosome name mismatch" is only reported when no alignment chromosome, afterchromosome_prefix/chromosome_mapping, is in the GTF. When names do overlap, the error points to the annotation, assembly or strandedness instead.The resulting order is: shared names → assignment failure; empty annotation → annotation error; otherwise → name mismatch.
Rebase notes: Nico's Cargo.lock commit is dropped (main already has newer versions), and his lint commit is already on main, so it was empty. Conflicts were only where main had changed nearby code: the GTF-order chromosome list in
counting.rs, the exon tables ingtf.rs, and tests appended at the end ofintegration_test.rs.#176's new integration tests fail on main's code (3/4; the fourth is the disjoint-names control) and pass here. #132's 4 GTF tests pass. Full suite, fmt and clippy are green locally.
Supersedes #132 and #176.
🤖 Generated with Claude Code