forked from transXpress/transXpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
transXpress.sh
executable file
·37 lines (29 loc) · 1.15 KB
/
transXpress.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /bin/bash
echo "Running the transXpress pipeline using snakemake"
CLUSTER="slurm"
if [ ! -z `which sbatch` ]; then
CLUSTER="SLURM"
fi
if [ ! -z `which bsub` ]; then
CLUSTER="LSF"
fi
if [ ! -z `which qsub` ]; then
CLUSTER="PBS"
fi
case "$CLUSTER" in
"LSF")
echo "Submitting snakemake jobs to LSF cluster"
snakemake --conda-frontend conda --use-conda --latency-wait 60 --restart-times 1 --jobs 10000 --cluster "bsub -oo {log}.bsub -n {threads} -R rusage[mem={params.memory}000] -R span[hosts=1]" "$@"
;;
"SLURM")
echo "Submitting snakemake jobs to SLURM cluster"
snakemake --conda-frontend conda --use-conda --latency-wait 60 --restart-times 1 --jobs 10000 --cluster "sbatch --comment RnD --partition i192,i128-o {log}.slurm.out -e {log}.slurm.err -n {threads} --mem {params.memory}GB" "$@"
;;
"PBS")
echo "Submitting snakemake jobs to PBS/Torque cluster"
snakemake --conda-frontend conda --use-conda --latency-wait 60 --restart-times 1 --jobs 10000 --cluster "qsub -o {log}.slurm.out -e {log}.slurm.err -l select=1:ncpus={threads}:mem={params.memory}gb" "$@"
;;
*)
snakemake --conda-frontend conda --use-conda --cores all "$@"
;;
esac