-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: off-by-one bug on bam reads #75
Comments
Closed
@38 this does look like a bug. Do you possibly have time to have a look? |
ghuls
added a commit
to ghuls/d4-format
that referenced
this issue
Jan 20, 2025
Fix off by one bug when converting BAM files to d4 files. Fixes: 38#75
brentp
pushed a commit
that referenced
this issue
Feb 4, 2025
Loading
Loading status checks…
* Fix off by one bug when converting BAM files to d4 files. Fix off by one bug when converting BAM files to d4 files. Fixes: #75 * First iteration adding d4tools create tests * Make sure the tests are in order --------- Co-authored-by: Jakob Willforss <jakob.willforss@hotmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'll make a genome of 30 bases, and my BAM has one read, 21 bases in length, that spans from bases 5-25 (1-based start) or 4-25 (0-based start):
It has this as a BAM:
It should be 4 bases depth 0, followed by 21 bases depth 1, followed by 5 bases at depth 0. See the samtools output below:
And just to provide a little more info, here are a couple bedtools operations:
Everything looks as expected to me. Now I'll make the d4 file:
Here it appears that the d4tools believes my read is 22 bases long, so the end coordinate is off by one, more specifically it's +1 more than it should be.
The text was updated successfully, but these errors were encountered: