Hi there,
I'm using BWA Version: 0.7.17 (which I cannot change) and I don't understand why BWA will sometimes not give me X0 and X1 tags and instead it will give me an XA tag. For example, this read lacks an X0 and X1 tag, but I do get an XA tag...
Reference span = chr17:16,068,356-16,068,404 (+) = 49bp
Cigar = 49M
Clipping = None
----------------------
Mate is mapped = yes
Mate start = chr17:16068427 (-)
Insert size = 121
Second in pair
Pair orientation = F2R1
----------------------
XA = chr7,-57669687,49M,3;chr20,-25733270,49M,3;
XG = 0
AM = 29
NM = 4
SM = 29
XM = 4
XO = 0
XT = M
However, sometimes I will get and X0, X1 AND an XA tag. Like with this read...
Reference span = chr17:16,068,394-16,068,442 (-) = 49bp
Cigar = 49M
Clipping = None
----------------------
Mate is mapped = yes
Mate start = chr17:16068300 (+)
Insert size = -142
Second in pair
Pair orientation = F1R2
----------------------
X0 = 2
X1 = 1
XA = chr17,+21544447,49M,2;chr7,+57669649,49M,3;
XG = 0
AM = 0
NM = 2
SM = 0
XM = 2
XO = 0
XT = R
Does anyone know why BWA does this?
XA is the old version of the 'SA' tag (supplementary alignments); but what are X0 and X1 ?
X0 and X1 are the number of hits and suboptimal hits respectively.
Could you show the whole bwa command? Are you using
bwa mem
or other algorithm? I suspect it isbwa aln
, as I believe X0 / X1 tags were dropped forbwa mem
.Are you sure the first read lacks the X0 / X1 tags? This output seems a copy / paste from IGV mouse head-over, so there may be a bug there.
Yes, it is bwa-aln. I am forced to use this build/version of BWA. Yes this is a copy/paste from IGV but I am 100% positive reads have no X0 or X1 tag, I have verified this using samtools view and pysam. For example this command
Using X0 gives the same result, about 5% of the reads in this region have no X0 or X1 tags.