Skip to content
Snippets Groups Projects
sbatch.zymo.sh 1.32 KiB
Newer Older
#!/bin/bash -l

##############################
# SLURM
# NOTE: used for this script only, NOT for the snakemake call below

#SBATCH -J ONT_SMK
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -c 1
#SBATCH --time=2-00:00:00
#SBATCH -p batch
#SBATCH --qos=qos-batch
#SBATCH --mail-type=end,fail
#SBATCH --mail-user=valentina.galata@uni.lu

##############################
# SNAKEMAKE

# conda env name
ONTP_ENV="snakemake"
# number of cores for snakemake
ONTP_CORES=20
# snakemake file
ONTP_SMK="workflow_zymo/Snakefile"
ONTP_CONFIG="config/Zymo/config.zymo.yaml"
ONTP_SLURM="config/Zymo/slurm.zymo.yaml"
ONTP_CLUSTER="{cluster.call} -t {cluster.runtime} -n {cluster.threads} -p {cluster.partition} -N {cluster.nodes} -q {cluster.quality} --job-name={cluster.job-name}"

##############################
# Snakemake

# activate the env
conda activate ${ONTP_ENV}

# unlock the pipeline
snakemake -s ${ONTP_SMK} -rp --jobs 10 --local-cores 1 \
 --configfile ${ONTP_CONFIG} --use-conda --conda-prefix ${CONDA_PREFIX}/pipeline \
 --cluster-config ${ONTP_SLURM} --cluster "${ONTP_CLUSTER}" --unlock 
 
# run the pipeline
snakemake -s ${ONTP_SMK} -rpn --jobs 10 --local-cores 1 \
 --configfile ${ONTP_CONFIG} --use-conda --conda-prefix ${CONDA_PREFIX}/pipeline \
 --cluster-config ${ONTP_SLURM} --cluster "${ONTP_CLUSTER}"