-
Notifications
You must be signed in to change notification settings - Fork 153
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
Possible error #145
Comments
so far my temporary fix is like the following in the GetTag() function:
This is a patch, not a real fix. |
I used the GetTagType function (http://pezmaster31.github.io/bamtools/struct_bam_tools_1_1_bam_alignment.html#ac9cac21df9ef4a0a3414387b97cf14da) to identify the 'c' type (http://pezmaster31.github.io/bamtools/_bam_constants_8h.html) and ended up using int8_t to read the NM tag. |
Does the bam definition have C type? |
Yes, see Section 1.5 of http://samtools.github.io/hts-specs/SAMv1.pdf. Integer types on tags (e.g., XS:i:20 in SAM format) may be encoded into the smallest integer that can hold the integer value. In the case of XS:i:20, this was encoded as XSC\024. The |
int tagval=-1;
When I use GetTag("NM", tagval);
The function is stuck at line: if ( !TagTypeHelper::CanConvertFrom(type)
in BamAlignment.h
When I looked at the TagData it was like: NMC^AMDZ98T2
const char type = *(pTagData - 1);
The type variable has a value of 'C' instead of 'i'. I am using the latest version of bwa. Looking into
the code of bwa, it is using the type i. The MD string is properly typed as Z.
Not sure this is caused by some modification from my part or not. Any one can give a pointer as to how to fix this bug? I will do the fixing.
The text was updated successfully, but these errors were encountered: