Created
June 18, 2025 17:34
-
-
Save rpetit3/52dd1bb7fd41ae234e3e749757e55de9 to your computer and use it in GitHub Desktop.
A script to submit a SLURM job to run Bactopia Tools on ATB data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# A script to submit a SLURM job to run Bactopia Tools on ATB data | |
# Expected Options: | |
# 1: Bactopia directory | |
# 2: Bactopia Tool | |
# 3: config file | |
# 4: A specific profile to use | |
# 5: A specific account to use | |
# 6: Where to cache singularity/apptainer images | |
BACTOPIADIR=${1} | |
WF=${2} | |
NFCONFIG=${3:-"/home/rpetit/bin/mbow.config"} | |
PROFILE=${4:-"mbow_fast"} | |
SBATCH_ACCOUNT=${5:-"healthdatasci"} | |
NXF_SINGULARITY_CACHEDIR=${6:-"/gscratch/rpetit/singularity-cache"} | |
sbatch <<EOT | |
#!/bin/bash | |
#SBATCH --job-name=bactopia-atb-${WF} | |
#SBATCH --output=bactopia-atb-${WF}.out | |
#SBATCH --error=bactopia-atb-${WF}.err | |
#SBATCH --time=72:00:00 | |
#SBATCH --ntasks=1 | |
#SBATCH --cpus-per-task=8 | |
#SBATCH --mem=32G | |
#SBATCH --account=${SBATCH_ACCOUNT} | |
#SBATCH --qos=Normal | |
# Load the necessary modules | |
module load miniconda3 | |
module load apptainer | |
conda activate bactopia | |
export NXF_SINGULARITY_CACHEDIR=${NXF_SINGULARITY_CACHEDIR} | |
export SBATCH_ACCOUNT=${SBATCH_ACCOUNT} | |
# Change to the working directory | |
bactopia \ | |
--bactopia ${BACTOPIADIR} \ | |
--wf ${WF} \ | |
--nfconfig ${NFCONFIG} \ | |
-profile ${PROFILE} \ | |
-resume | |
EOT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment