-
Notifications
You must be signed in to change notification settings - Fork 0
/
rufus_docker_single.slrm
49 lines (41 loc) · 1.47 KB
/
rufus_docker_single.slrm
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
#$ -cwd
#$ -S /bin/bash
#SBATCH --error=/scratch.global/neis/bakeoff/logs/%x.%j.e
#SBATCH --output=/scratch.global/neis/bakeoff/logs/%x.%j.o
#SBATCH --mail-type=FAIL
#SBATCH [email protected]
#SBATCH --time=24:00:00
#SBATCH -n 40
#SBATCH -N 1
#SBATCH --mem 64G
set -e
# keep track of the last executed command
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
# echo an error message before exiting
trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT
SECONDS=0
module load parallel
refDir=/home/pankrat2/public/resources/GATK4/
cramDir=/scratch.global/neis/bakeoff/${GROUP}/cram/
rufusRefDir=/home/pankrat2/public/resources/RUFUS/
BASE=""
if [[ $EXCLUSION == "1000G_SNP" ]]; then
EXCLUSION=${rufusRefDir}1000G.snp.RUFUSreference.min45.Jhash
BASE="1000G_SNP/"
else
EXCLUSION=${rufusRefDir}1000G.RUFUSreference.min45.Jhash
fi
outDir=/scratch.global/neis/bakeoff/${BASE}${GROUP}/${SAMPLE}
mkdir -p $outDir
cd $outDir
echo "Running RUFUS on sample ${SAMPLE}"
singularity run --pwd "$outDir" \
--bind "$refDir" \
--bind "$cramDir" \
--bind "$rufusRefDir" \
--bind "$outDir" \
"docker://ghcr.io/pankratzlab/rufus:master" \
/RUFUS/runRufus.sh -vs -s ${cramDir}${SAMPLE}.recab.cram -e ${EXCLUSION} -k 25 -t 40 -r ${refDir}GRCh38_full_analysis_set_plus_decoy_hla.fa -cr ${refDir}GRCh38_full_analysis_set_plus_decoy_hla.fa
ELAPSED="Elapsed: $(($SECONDS / 3600))hrs $((($SECONDS / 60) % 60))min $(($SECONDS % 60))sec"
echo $ELAPSED