Newer
Older

Valentina Galata
committed
#!/bin/bash -l
##############################
# SLURM
# NOTE: used for this script only, NOT for the snakemake call below

Valentina Galata
committed
#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

Valentina Galata
committed
# number of cores for snakemake
ONTP_CORES=20
# snakemake file
ONTP_SMK="workflow_zymo/Snakefile"

Valentina Galata
committed
# config file

Valentina Galata
committed
# slurm config file
ONTP_SLURM="config/zymo/slurm.zymo.yaml"

Valentina Galata
committed
# slurm cluster call
ONTP_CLUSTER="{cluster.call} -t {cluster.runtime} -n {cluster.threads} -p {cluster.partition} -N {cluster.nodes} -q {cluster.quality} --job-name={cluster.job-name}"

Valentina Galata
committed
##############################
# Snakemake
# activate the env
conda activate ${ONTP_ENV}
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}"