bamCoverage --MNase: three centre bases for odd fragment lengths - #1466
Open
cindykrafft wants to merge 1 commit into
Open
bamCoverage --MNase: three centre bases for odd fragment lengths#1466cindykrafft wants to merge 1 commit into
cindykrafft wants to merge 1 commit into
Conversation
manipulate_record returned frag_start..frag_start + 4 for an odd template length, i.e. four bases -- one left and two right of the fragment centre -- where the --MNase help documents "only 3 nucleotides at the center of each fragment" (deeptools#1118; the Python implementation had the same defect through true division of read.tlen). Even lengths are unchanged. Tests: cargo tests on synthetic proper-pair records of insert size 150, 149 and 131; a pytest on the shipped test_paired2.bam (147-bp pairs give 3 bases, 166/154-bp pairs give 2). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TaHntBDKuZJpMAAMenkC44
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.
CHANGES.txtbullet onlyAlignmentfilters::manipulate_record(src/filtering.rs) returnedfrag_start..frag_start + 4for an odd template length: four bases, one left and two right of the fragment centre, where the--MNasehelp documents "only 3 nucleotides at the center of each fragment" (#1118; the Python implementation had the same four bases through true division ofread.tlen).+ 3restores the documented three; even lengths are unchanged.Tests: two cargo tests in
src/tests/test_filtering.rson synthetic proper-pair records (insert sizes 150 →[174, 175]; 149 →[173, 174, 175]; 131 →[1064, 1065, 1066]), andtest_bam_coverage_MNase_odd_fragment_lengthon the shippedtest_paired2.bam(147-bp pairs give 3 bases, 166/154-bp pairs give 2). The cargo test fails onmaster(left: Some([173, 174, 175, 176])), the pytest fails on themasterbuild; with the patchcargo test50 passed,test_bamCoverage_and_bamCompare.pyand the full pytest suite pass.Found in Mytochondria, a volunteer project that checks the numerical core of research software and verifies every finding by execution (methods and harnesses: https://github.com/cindykrafft/mytochondria/tree/main/audits/deeptools)
Generated by Claude Code