samtools provides simple stats on BAM files samtools flagstat $input1 > $output1 **What it does** This tool uses the SAMTools_ toolkit to produce simple stats on a BAM file. .. _SAMTools: http://samtools.sourceforge.net/samtools.shtml