Question: Are XA: tagged reads == SA: tagged BWAMEM aligned reads?
3.6 years ago by

I have a simple question. I am interested in reads with secondary alignments.

I have a script that will parse out reads with secondary alignments for BWAMEM BAM files. These reads are tagged with "SA:"

My problem is that I'm working with BAM files that are not BWAMEM aligned. If I search for SA tagged reads I return nothing.


However I noticed there are reads with a XA: tag with information nearly the same as SA taggs. Are these XA: tagged reads equivalent to SA tagged reads?

In the context of CNV discovery. Split reads (with secondary alignments/ SA tags in BWAMEM) are informative. If the XA tag reads are "split reads" then I should be able to use them for CNV discovery.


Or am I missing the whole point of XA tags?

secondary samtools bam tag bwamem • 2.0k views
ADD COMMENTlink modified 3.6 years ago by Zev.Kronenberg11k • written 3.6 years ago by QVINTVS_FABIVS_MAXIMVS2.3k

XA is not a standard field, so the definition depends on the aligner.  Which aligner are you using?

ADD REPLYlink written 3.6 years ago by Brian Bushnell16k
gravatar for Zev.Kronenberg
3.6 years ago by
United States
Zev.Kronenberg11k wrote:

XA are alternative alignments (~secondary hits).

SA are chimeric alignments (split reads)

You can also search for the 0x800 flag for the second alignment of the splitter.

Which version of BWA mem are you using?  

The older version of BWA mem provides another flag XP, for splitters.

ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by Zev.Kronenberg11k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1563 users visited in the last hour