# How to perform bowtie2 analysis with slurm?

I am trying to run my alignment script that works locally, using SBATCH.

Official manual for bowtie2 says I can use samtools for that. However when I run the following script I have an error

line 22: bowtie2: command not found


Below is the script:

#!/bin/bash

#SBATCH --time=05:00:00
#SBATCH --account=def-myaccount
#SBATCH --mem=200000M
#SBATCH --mail-user=mymail@gmail.com
#SBATCH --mail-type=All

for FILE in *R1_001.fastq.gz;

do
BASENAME=${file%%_R1_001.fastq.gz*} NUM=echo$FILE | sed 's/_S.*\$//'

bowtie2 -x cov_nastya -U $$FILE -S$${NUM}exit.sam

done


It seems you do not have bowtie installed or loaded. Use module load bowtie2 together when you load samtools.
• Thank you, it worked. Just a general inquiry at the end.. Is samtools really necessary here? Thanks. Feb 10 at 22:56