Closed sagnikbanerjee15 closed 1 year ago
Hello,
I wish to extract some fields from a BAM file of B type. For example, jM:B:c,1 jI:B:i,3914,3995. Here is the code I am using:
B
jM:B:c,1 jI:B:i,3914,3995
uint8_t *jI = bam_aux_get(aln,"jI"); printf("\nValue of jI: %hhn", jI); if(jI != NULL) { char *jI_val = NULL; jI_val = bam_aux2Z(jI); printf("\njI:%s", jI_val); }
I know what I am doing is incorrect but I am unsure what to replace it with. Could you please help?
Also, is there detailed documentation about the API?
Thank you.
For B tags, use bam_aux_get() followed by bam_auxB_len, then bam_auxB2i or bam_auxB2f depending on type.
bam_aux_get()
Thanks it worked!
Hello,
I wish to extract some fields from a BAM file of
B
type. For example,jM:B:c,1 jI:B:i,3914,3995
. Here is the code I am using:I know what I am doing is incorrect but I am unsure what to replace it with. Could you please help?
Also, is there detailed documentation about the API?
Thank you.