docs(codec): document the CODEC model and its quality-masking options - #616
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe ChangesCodec command help
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #616 +/- ##
==========================================
+ Coverage 93.42% 93.51% +0.08%
==========================================
Files 175 175
Lines 104807 105739 +932
==========================================
+ Hits 97919 98880 +961
+ Misses 6888 6859 -29 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f621649 to
aced591
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
`fgumi codec --help` had `long_about = None`, so it showed only the one-line about. Nothing explained CODEC's defining property -- that both strands of a source duplex molecule arrive in a single read pair, R1 carrying one strand and R2 the other, so duplex evidence comes from comparing the two reads rather than from grouping reads across the file the way `duplex` does. That is what a user needs in order to know when this command applies. Nor was anything documented about --single-strand-qual, --outer-bases-qual / --outer-bases-length, --min-duplex-length, or the two --max-duplex-disagreement* flags -- several of which mask quality rather than discard bases, which is not guessable from the flag name. The same hole appeared in the generated Tool Reference. The new text also notes that --methylation-mode is unsupported for CODEC; the flag is absent from the command entirely.
aced591 to
af75797
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
fgumi codec --helphadlong_about = None, so it showed only the one-line about. Nothing explained CODEC's defining property — that both strands of a source duplex molecule arrive in a single read pair, R1 carrying one strand and R2 the other, so duplex evidence comes from comparing the two reads rather than from grouping reads across the file the wayduplexdoes. That is the thing a user needs in order to know when this command applies.Nor was anything documented about
--single-strand-qual,--outer-bases-qual/--outer-bases-length,--min-duplex-length, or the two--max-duplex-disagreement*flags — several of which mask quality rather than discard bases, which is not guessable from the flag name. The same hole appeared in the generated Tool Reference.The new text also notes that
--methylation-modeis unsupported for CODEC. I verified that rather than taking it on faith: the flag is absent from the command entirely.What this PR no longer does
An earlier revision also added an error hint to
codec,simplexandduplextelling users to pass--threadswhen the input is uncompressed SAM. That hint was wrong, and it has been dropped along with the three tests that asserted it.Checked against the built binary on
main:--threadsdoes not select a SAM-capable reader. Both paths fail identically, becausecreate_bam_reader_for_pipeline_with_optsreads its header throughnoodles_bgzf::io::Readerexactly ascreate_raw_bam_reader_with_optsdoes, and there is no SAM text path anywhere infgumi-bam-io:The wording came from upstream, where
ReadSamChunks/ParseSamChunkgenuinely exist — that capability did not survive the port tomain, so the hint would have sent users to a flag that reproduces the identical error. That is strictly worse than the bare error, which at least already names the file and saysinvalid BGZF header.The real fix is #642: every command that accepts BAM must accept SAM. That is implemented in a separate PR rather than papered over with a message here.
Removing the hint also restores three helper functions' doc comments, which the deleted tests had been inserted in front of (so e.g.
/// Helper to create a Codec with specified input/output pathshad ended up documenting a test).cargo check --all-targetspasses; the change is now confined tocodec.rs.Summary by CodeRabbit
fgumi codeccommand help text with detailed guidance on CODEC data assumptions.