This is a test version of Biostars. For the public version, visit https://www.biostars.org.
samtools pileup format: insertions and deletions' quality

I have some questions about samtools pileup format http://samtools.sourceforge.net/pileup.shtml:

  1. at the read base column, a symbol ^' marks the start of a read segment which is a contiguous subsequence on the read separated byN/S/H' CIGAR operations. The ASCII of the character following `^' minus 33 gives the mapping quality.

    The base that is the start of a read segment which is a contiguous subsequence on the read separated by `N/S/H' CIGAR operations is before the symbol '^' or after the symbol and the ASCII?

  2. A symbol `$' marks the end of a read segment.

    The base that is the end of a read segment is before or after the symbol '$'?

  3. For the insertions in the column of read bases, are the qualities of the inserted bases given in the next column? What is the base of the read with a insertion in the reference position? Where is the base quality of the anchor base?

  4. For the deletions in the column of read bases, what is the base of the read with a deletion in the reference position? Where is the base quality of the anchor base?

I couldn't find the answers for the above questions. Could you please help me with these problems? Thank you for your time!

sequencing alignment genome

1 answer

You can answer these questions yourself by experimenting with a simple SAM file like the following:

@SQ SN:chr3 LN:1000000
foo 0   chr3    70000   20  4M  *   0   0   ATGC    abcd 
bar 0   chr3    80000   20  2M2I2M  *   0   0   AATGCC  abcdef
baz 0   chr3    90000   20  2M2D2M  *   0   0   ATGC    abcd

Look at the output of samtools mpileup foo.sam and most of your queries will become clear.

Log in to answer this question.