This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bam1_Core_T : "Strand" Field

watching the type "bam1coret" at http://samtools.sourceforge.net/samtools/bam/index.html?Functions/Functions.html#//apple_ref/c/func/bam_write1 there is the explanation of the "strand" field, which if I understand it indicates if the filament is forward or backward ... but is not implemented in the structure bam1coret. How can i get the strand field?

strand

1 answer

two C macros are defined in "bam.h" to extract the orientation from bam1coret.flag' :

#define bam1_strand(b) (((b)->core.flag&BAM_FREVERSE) != 0)
#define bam1_mstrand(b) (((b)->core.flag&BAM_FMREVERSE) != 0)

in bam.h there are BAM_FREVERSE and BAM_FMREVERSE, not bam1_strand(b) or bam1_mstrand(b)

Log in to answer this question.