SAMtools
SAMtools provides tools for using and manipulating SAM and BAM formatted alignments. You can use SAMtools for example for indexing, variant calling and viewing alignments.
License
Free to use and open source under MIT/Expat License.
Available
Puhti: 1.9, 1.16, 1.18
Usage
To use SAMtools in Puhti you can use initialization command:
module load biokit
The biokit module sets up a set of commonly used bioinformatics tools, including SAMtools and Picard (Note however that there are also bioinformatics tools in Puhti, that have a separate setup commands.)
After this you can launch samtools
samtools
You can check the available samtools versions with command:
module spider samtools
And the activate the version you want to use. For example:
module load samtools/0.1.19
Loading SAMtools 1.x also loads BCFtools and HTSlib.
Heavier SAMtool jobs should be executed as batch jobs. Below is a sample batch job file, for running a SAMtools job in Puhti:
#!/bin/bash -l
#SBATCH --job-name=samtools
#SBATCH --output=output_%j.txt
#SBATCH --error=errors_%j.txt
#SBATCH --time=04:00:00
#SBATCH --mem=4000
#SBATCH --account=project_1234567
#SBATCH --ntasks=1
#Convert SAM file to BAM
samtools view -bS aln.sam > aln.bam
#Sort the bam file
samtools sort aln.bam aln-sorted
#Index the bam file
samtools index aln-sorted.bam
You can submit the batch job file to the batch job system with command:
sbatch batch_job_file.bash