This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Sam Format Optional Fields Specification

Hey there,

I currently try to find out what the flag XA:Z: means. I looked through this PDF optional field specification but it just says that tags starting with X are reserved for end users. So does anyone know what this flag means? Here is one example of my sam file. This is a result of a mapping against a multi fasta reference.

M_K00149:52:HJKW7BBXX:4:2126:5720:40913 16      AB032433_chimp_gorilla  18      0       88M     *       0       0       AAACTCTGCAAGATCCCAGAGTGAGGGGCCTGTATTTTCCTGCTGGTGGCTCCAGTTCAGGAACAGTAAACCCTGTTCCGAATACTGC        A<FFFJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJFJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJFFFAA        RG:Z:IL235-Kars_537_M.NA.NA.170524_K00149_0052_BHJKW7BBXX.G05692        XT:A:R  NM:i:5  X0:i:3  X1:i:0  XM:i:5  XO:i:0  XG:i:0  MD:Z:2G7G11A42T1G20     XA:Z:gibbon_orang_1_restored,-18,88M,5;D,-20,88M,5;

I aligned Shotgun data with bwa aln against the reference. Thanks in Advance :)

sam alignment

May depend on the tool used for alignment, what was used? Please be as complete as possible when asking questions.

Sorry. I will add the information.

maybe It still services(?) XA tags for alternative alignment, and it is different from chimeric alignment which is provided by SA tags

Output alternative hits in the XA tag if there are not so many of them. This is a BWA-backtrack feature. Support mapping to ALT contigs in GRCh38 (EXPERIMENTAL). We provide a script to postprocess hits in the XA tag to adjust the mapping quality and generate new primary alignments to all overlapping ALT contigs. We would NOT recommend this feature for production uses.

1 answer

According to the bwa documentation (scroll down a ways), XA tags are Alternative hits; format: (chr,pos,CIGAR,NM;). The Negative position means that it aligns reverse-complemented.

Thank you. I was searching at the wrong place then :)

Log in to answer this question.