-
Notifications
You must be signed in to change notification settings - Fork 446
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
bam_parse_cigar
possibly adds data to a wrong place
#1650
Comments
And another little thing - this definition couple of times says "integer" instead of "float". Not very important, of course |
Obviously a cut and paste error. Thanks for reporting. I'll take a look at the cigar thing. |
I think the problem here is It appeared in 9a55e4e and it's unclear if the plan was for it to later become than it currently is, and to act as a generic BAM modification tool. As writyen it clearly just appends to The code could therefore be modified to check for this and become a genuine CIGAR rewriting tool. There is potentially a use for this, even if it's just clearing a CIGAR. |
Agreed. To use |
It's not that hard to do though. It just needs a |
partially parsed ones. It makes little sense for this to exist as a public API when it's only capable of handling the internal during-SAM-parse situation, and the changes are relatively minor. Also fixes an undocumented assumption that end == &in. Fixes samtools#1650
Btw, for my information: what values one should pass as |
partially parsed ones. It makes little sense for this to exist as a public API when it's only capable of handling the internal during-SAM-parse situation, and the changes are relatively minor. Also fixes an undocumented assumption that end == &in. Fixes #1650
partially parsed ones. It makes little sense for this to exist as a public API when it's only capable of handling the internal during-SAM-parse situation, and the changes are relatively minor. Also fixes an undocumented assumption that end == &in. Fixes samtools#1650
I am trying to create a BAM file from scratch and using
bam_set1
to create records. Whenbam_set1
is called with 0 forsize_t n_cigar
and NULL forconst uint32_t *cigar
and those fields are filled later usingbam_parse_cigar
, then resulting BAM file appeared to be corrupted. Seems thatbam_parse_cigar
adds CIGAR data not beforeseq
but afterqual
.I'm not sure I'm using it correctly though, I'm sorry if it appears to be my mistake...
Output:
The text was updated successfully, but these errors were encountered: