-
Notifications
You must be signed in to change notification settings - Fork 9
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
ML tag not correctly parsed? #142
Comments
Here's some information. The problem appears to be in the parsing of length here, at ine 35 of decodeRecord.ts.
It returns the incorrect value of 144. I'm sure its no coincidence that the first byte of the correct value of 656 is 144, but I don't know why this fails. The complete set of bytes BTW is [144, 2, 0, 0] Replacing line 35 with the following fixes the problem, length is now the correct value of 656
I can submit a PR for this if you like, but that is the only change. |
Thanks for this Jim. I am guessing the bug arises because |
I'll submit a PR. Your guess would make sense, since the value returned was the value of the first entry in the Uint8Array. |
fixed in v3.0.6. thanks again for pushing the fix :) |
Hi @cmdcolin , this is a test case for the issue alluded to in igvteam/igv.js#1895. I'm not super familiar with either Typescript or Node but the code itself looks correct (
parseTagValueArray
), I don't see anything obviously wrong, so this is a mystery.The attached CRAM file has a single alignment on genome hg38 at ~ location
chr15:23,627,837-23,654,650
. The ML tag should contain a byte array of size 656. However the value inrecord.tags
is an array of size 144.Tested with cram-js v3.0.5
ML_Test.zip
The value of the ML tag, which can be verified with samtools view, should be
The text was updated successfully, but these errors were encountered: