This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bwa Sam Output Doubts

Can anyone explain the following tags from BWA sam output.

GA004_0001:5:1:1073:12995#0   0       chr10   135119228       37      75M     *       0       0       CTGGGTTTGGCATAGTGGGAGGGCAGGCAGGGGTGGTTTTCCTGGCTACTCAGGGTTGCAGAGGACAGGACCGA
A     CCCBCCCBCBCCC=CCCCCCCC@@BCCCCCCBC?C>=CCACAC@A+?;<;BAA@A08A++?6?<9ACCC68=C8<     XT:A:U  NM:i:1  X0:i:1  X1:i:0  XM:i:1  XO:i:0  XG:i:0  MD:Z:45A29

How to check whether a tags in unique hot or multiple hits as sam flag is bit confusing to read. Thanks.

sam output bwa alignment format

XT:A:U means unique and XT:A:R means repeats. What are the other X:?:? tags used. Please explain.

2 answers

Here and in more details here, you can find a good description of the SAM/BAM standard and what all fields mean. There is also a page with predefined tags and it says how you can make your own.

Those starting with X,Y and Z are "reserved for end user" Maybe an intermediate program?

NM:i:1 Number of nucleotide differences

MD:Z:45A29 String of mismatching position

I don't quite understand when you say "tags in unique hit or multiple hits"

Multiple vs unique hits are encoded in a numerical form.

For checking just one flag: http://picard.sourceforge.net/explain-flags.html

For checking multiple tags on a command line: http://picard.svn.sourceforge.net/viewvc/picard/trunk/src/scripts/explain_sam_flags.py

Just collect all unique tags from your SAM file and see what you got there first.

See also "SAM format parsing / stats" post

Log in to answer this question.