Pages

Friday, June 13, 2014

Find Total, Mapped, and Unmapped Alignments in a BAM File

Often one of the first descriptive statistics of interest for a .bam file is the total number of alignments included in the BAM file.  An alignment is where a read from a next-generation sequencing approach maps to the reference genome.  There are a few ways of calculating the total number of mapped, unmapped, and overall number of alignments, but in my opinion samtools provides the most powerful and efficient means of doing this.  Here are some simple example scripts to count total alignments and total reads in a bam file.

No comments:

Post a Comment