-
Notifications
You must be signed in to change notification settings - Fork 0
/
DELLY_03Genotype (1).sh
45 lines (36 loc) · 1.47 KB
/
DELLY_03Genotype (1).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
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
## Script for genotyping SVs with delly
## Date: 24 April 2018
##
## Example usage:
## INDIR=/data/neurogenetics/alignments/Illumina/genomes/allGenomes SITELIST=/fast/users/a1211880/outputs/SVcalling/dellyOut/sites.bcf sbatch --array 0-125 dellyGenotype.sh
#SBATCH -A robinson
#SBATCH -p batch
#SBATCH -N 1
#SBATCH -n 16
#SBATCH --time=1-00:00
#SBATCH --mem=8GB
# Notification configuration
#SBATCH --mail-type=END
#SBATCH --mail-type=FAIL
#SBATCH [email protected]
# define key variables
DELLYEXE=/data/neurogenetics/executables/delly-0.7.8/delly_v0.7.8_parallel_linux_x86_64bit
INDIR=/data/neurogenetics/alignments/Illumina/genomes/CPtwins
OUTDIR=/fast/users/a1742674/outputs/SVcalling/dellyOut
GENOMEDIR=/fast/users/a1742674/reference
SITELIST=/fast/users/a1742674/outputs/SVcalling/dellyOut
# define query bam files
QUERIES=($(ls $INDIR/*.bam | xargs -n 1 basename))
# run the thing
### SV discovery/calling phase ###
echo $(date +"[%b %d %H:%M:%S] Starting delly genotyping")
echo "Processing file: "${QUERIES[$SLURM_ARRAY_TASK_ID]}
$DELLYEXE call \
-g ${GENOMEDIR}/hs37d5.fa.gz \
-v ${SITELIST}/sites.bcf \
-o ${OUTDIR}/${QUERIES[$SLURM_ARRAY_TASK_ID]}.geno.bcf \
-x ${GENOMEDIR}/excludeTemplates/human.hg19.excl.tsv \
${INDIR}/${QUERIES[$SLURM_ARRAY_TASK_ID]} \
2>${OUTDIR}/${QUERIES[$SLURM_ARRAY_TASK_ID]}.dellyGen.log
echo $(date +"[%b %d %H:%M:%S] All done!")