Skip to content

fix(counting): distinguish chromosome mismatch from unassigned reads - #176

Draft
NicoDeVeaux wants to merge 5 commits into
mainfrom
ndv/fix-no-genic-reads-diagnostic
Draft

NicoDeVeaux wants to merge 5 commits into
mainfrom
ndv/fix-no-genic-reads-diagnostic

Conversation

@NicoDeVeaux

@NicoDeVeaux NicoDeVeaux commented Oct 23, 2026 •

Copy link
Copy Markdown

When mapped reads cannot be assigned to a gene, RustQC now reports a chromosome-name mismatch only when the effective alignment names and GTF names are disjoint. Shared names produce an assignment diagnostic that directs users to annotation/genome assembly and strandedness settings.

The wording deliberately describes configured gene assignment: a read can physically overlap a gene and still be excluded by --stranded. The previous version of this PR incorrectly said that no mapped read overlapped a gene in that case. Exit behavior stays nonzero for zero assignment; deciding whether to produce partial/empty outputs is a separate owner decision.

Validation of 7c5985 on macOS arm64 / Rust 1.90.0:

  • All 236 release tests pass: 200 library, 12 binary, 22 integration and two doc tests. Formatting and strict release-profile Clippy pass; default-profile CI checks are reported separately.
  • The original shared-name, prefix-mapped-name and genuinely disjoint-name cases remain covered.
  • The new wrong-strand case uses the same physically overlapping reverse read as a successful unstranded control, then verifies a nonzero forward-strand failure with an accurate assignment diagnostic. The assertion fails against the previous PR head and passes after repair.
  • Exact native head/version and executable-byte checks bind the final validation to this source. Separate small commits carry the verified iterator-only lint cleanup and crossbeam-epoch/libz-sys lockfile security updates.

This stays independent of #175's counting work and the #118 → #177 → #178 reader migration. The existing mismatch branch's example chromosome mapping is unchanged. Fresh GitHub CI is reported by the checks on this PR; no full RNA-QC or release acceptance is claimed.

This update is written by GPT-6 on Nico DeVeaux's behalf. The original PR was prepared with Claude Code.

NicoDeVeaux and others added 5 commits October 23, 2026 11:20
…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.
Port the separately verified seven-line iterator delta from a9083c, preserving integer addition and channel order.
Apply only the crossbeam-epoch 0.9.20 and libz-sys 1.1.31 version/checksum blocks from b5658a8. These exact pins passed the combined candidate validation.
@NicoDeVeaux NicoDeVeaux changed the title fix(counting): claim a chromosome name mismatch only when names don't overlap fix(counting): distinguish chromosome mismatch from unassigned reads Nov 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant