This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Understand Samtools View Output
samtools view BAMFILE chr2:1,000,000-2,000,000

Hi I use the above command to get an output but I don't understand the meaning.

6197WAAXX100111:2:80:17948:14261    163    chr21    38781704    99    101M    =    38782013    409    AAATACATATATTGAATATGTGGATAAAATCACTAGAATATATTCGTGCAATAACATCTACGTGAGACATGACAGCATCTCACCATGTCTGGCAGTCTCTC    ;=>==<???@@ABBCDCDDEDEFEEEFFFEDECEEEFFEEEEEED>EEEEFEEFDFCDFED<EEFEFCFEEEDFEFDBDCEFAEDDCC@BBAD@AA>A>?<    RG:Z:6197W.2    E2:Z:GGGGGAGGGGGGGTGGGGGTGTTGGGGGCGAGAGCAGTATGCGGATGTACTATCACGAGCAAGTGATATGTCAGAAGCAAACAAGGTAAGTTAGACAGAGA    OQ:Z:CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDCCCCBCCCCCCCCCDCCCCB@CBCCBCDDBAABB@C>BBAAB>A    PG:Z:6197W.2    NM:i:0    UQ:i:0

There are so many columns. Thanks for help.

samtools

The link is broken for me.

My question is not for sam file's format. My question is that if I use the command samtools view -o output.txt bam region Then in the output file, there are many columns. I don't know the meaning. It is different the sam file's format.

I have the same question, did you figure this out? The output for using samtools view is different than the straight samtools format columns...

1 answer

Sam format: column information:

  1. QNAME: Query name of the read or the read pair
  2. FLAG: Bitwise flag (pairing, strand, mate strand, etc.)
  3. RNAME: Reference sequence name
  4. POS: 1-Based leftmost position of clipped alignment
  5. MAPQ: Mapping quality (Phred-scaled)
  6. CIGAR: Extended CIGAR string (operations: MIDNSHP)
  7. MRNM: Mate reference name (‘=’ if same as RNAME)
  8. MPOS: 1-based leftmost mate position
  9. ISIZE: Inferred insert size
  10. SEQQuery: Sequence on the same strand as the reference
  11. QUAL: Query quality (ASCII-33=Phred base quality)

FURTHER DETAILS OF SAM FORMAT: http://samtools.sourceforge.net/SAM1.pdf

Log in to answer this question.