Samtools is a suite of programs for interacting with high-throughput sequencing data. It consists of three separate repositories:
Samtools - Reading/writing/editing/indexing/viewing SAM/BAM/CRAM format
BCFtools - Reading/writing BCF2/VCF/gVCF files and calling/filtering/summarising SNP and short indel sequence variants
HTSlib - A C library for reading/writing high-throughput sequencing data
Samtools and BCFtools both use HTSlib internally, but these source packages contain their own copies of htslib so they can be built independently.
Documentation
Slurm script
Using the package under srun
. A batch script can also be used.
$ module load load samtools $ samtools view colons.bam chr1 0 chr1 1 0 10M * 0 0 AACCGCGGTT * chr1b 0 chr1 111 0 10M * 0 0 AACCGCGGTT * chr1:100 0 chr1:100 100 0 10M * 0 0 AACCGCGGTT * chr1:100-200 0 chr1:100-200 100 0 10M * 0 0 AACCGCGGTT * chr2:100-200 0 chr2:100-200 100 0 10M * 0 0 AACCGCGGTT * chr1,chr3 0 chr1,chr3 100 0 10M * 0 0 AACCGCGGTT * $ samtools sort -O bam -o colons_sorted.bam colons.bam
Build instructions for those who are curious
git clone https://github.com/samtools/samtools.git
cd samtools
./configure --prefix=/mnt/nasapps/production/samtools/1.21
make -j8 && make test-all && make install