== Create a bowtie index == bowtie-build input.fasta output_index_name == Working with samtools to summarize an alignment == If you have a sorted, indexed bam file: {{{ samtools idxstats bamfile.bam }}} returns a 4 column format of reference feature, length, # of mapped reads, # of unmapped reads (in case of paired end?) To summarize the total, you can use awk to add up the entries in the 3rd column: {{{ samtools idxstats bamfile.bam | awk '{sum += $3}END{print sum}' }}}