Skip to main content

Example SLURM Script (from video)

fastqc.sh and multiqc.sh scripts at bottom of page

(slurm script)

#!/bin/bash
#SBATCH --job-name=qcjob
#SBATCH --output=%x_%j.out
#SBATCH --error=%x_%j.err
#SBATCH --account=<your_department>
#SBATCH --partition=compute
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=16
#SBATCH --mem=100GB
#SBATCH --time=01:00:00
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=<[email protected]>

echo 'Running on host: ' `hostname`
echo 'Starting Time: ' `date`
echo 'Job ID: ' $SLURM_JOB_ID
echo 'Node list: ' $SLURM_JOB_NODELIST
echo 'Task ID: ' $SLURM_ARRAY_TASK_ID

# Your executable or script here
# ./your_program_to_run_here

scripts_dir=/path/to/your/home/new_project/scripts

${scripts_dir}/fastqc.sh
${scripts_dir}/multiqc.sh

(fastqc.sh)

#!/bin/bash

module load user/all/azeez

reads="/path/to/your/home/new_project/reads/*.fq.gz"
output_dir="/path/to/your/home/new_project/fastqc_results"

fastqc ${reads} -o ${output_dir}

(multiqc.sh)

#!/bin/bash

module load user/all/azeez

fastqc_results="/path/to/your/home/new_project/fastqc_results"
output_dir="/path/to/your/home/new_project/multiqc_results"

multiqc ${fastqc_results} -o ${output_dir}