-
Notifications
You must be signed in to change notification settings - Fork 0
/
rufus_reference.slrm
45 lines (34 loc) · 1.44 KB
/
rufus_reference.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
#!/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=96:00:00
#SBATCH -n 126
#SBATCH -N 1
#SBATCH --mem 256G
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}/
rufusRefDir=/home/pankrat2/public/resources/RUFUS/
outDir=/scratch.global/neis/bakeoff/${GROUP}/${SAMPLE}/
mkdir -p $outDir
cd $outDir
echo "Running RUFUS on sample ${SAMPLE} starting at $(date)"
singularity run --pwd "$outDir" \
--bind "$refDir" \
--bind "$cramDir" \
--bind "$rufusRefDir" \
--bind "$outDir" \
"docker://ghcr.io/pankratzlab/rufus:master" \
/RUFUS/runRufus.sh -vs -s /scratch.global/neis/bakeoff/${GROUP}/cram/${SAMPLE}.recab.cram -e /home/pankrat2/public/resources/GATK4/GRCh38_full_analysis_set_plus_decoy_hla.Jhash -cr /home/pankrat2/public/resources/GATK4/GRCh38_full_analysis_set_plus_decoy_hla.fa -k 25 -t 126 -r /home/pankrat2/public/resources/GATK4/GRCh38_full_analysis_set_plus_decoy_hla.fa
ELAPSED="Elapsed: $(($SECONDS / 3600))hrs $((($SECONDS / 60) % 60))min $(($SECONDS % 60))sec"
echo $ELAPSED