Samtools

After aligning reads with Bowtie2, the resulting output file is in SAM format.
Because SAM files are large and not indexed, we use Samtools to convert them into the compressed BAM format and sort them for downstream analysis.

Samtools is a suite of programs for analyzing sequence data.

Running Samtools interactively:

$ module spider samtools

$ module load samtools/1.21

# look at difference in file sizes
$ samtools view -S -b lamda.sam > lamda.bam

$ ls -lh lamda.*

$ samtools sort lamda.bam > lamda-sorted.bam # puts in same order as fastq files

Previous
Next
RC Logo RC Logo © 2025 The Rector and Visitors of the University of Virginia