-
Notifications
You must be signed in to change notification settings - Fork 0
/
DELLY_05GermlineFilter_PASS.sh
53 lines (41 loc) · 1.39 KB
/
DELLY_05GermlineFilter_PASS.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
46
47
48
49
50
51
52
53
#!/bin/bash
## Script for filtering merged SVs with the delly germline filter
## Requires at least 20 unrelated samples
## Date: 24 April 2018
##
## Example usage:
## INDIR=/fast/users/a1742674/outputs/SVcalling/dellyOut sbatch dellyGermlineFilter.sh
#SBATCH -A robinson
#SBATCH -p batch
#SBATCH -N 1
#SBATCH -n 8
#SBATCH --time=1-00:00
#SBATCH --mem=8GB
# Notification configuration
#SBATCH --mail-type=END
#SBATCH --mail-type=FAIL
#SBATCH [email protected]
# set variables
DELLYEXE=/data/neurogenetics/executables/delly-0.7.8/delly_v0.7.8_parallel_linux_x86_64bit
INDIR=/fast/users/a1742674/outputs/SVcalling/dellyOut
OUTDIR=/fast/users/a1742674/outputs/SVcalling/dellyOut
# load modules
module load BCFtools/1.3.1-GCC-5.3.0-binutils-2.25
# run the thing
echo $(date +"[%b %d %H:%M:%S] Go to dir")
cd $INDIR
pwd
echo $(date +"[%b %d %H:%M:%S] Check for merged bcf")
ls merged.bcf
echo $(date +"[%b %d %H:%M:%S] Index bcf")
bcftools index merged.bcf
echo $(date +"[%b %d %H:%M:%S] Apply delly germline filter")
$DELLYEXE filter \
-f germline \
-p \
-o germline_PASS.bcf merged.bcf
# if you want to keep only variants where FILTER=PASS
# add -p to the above command
echo $(date +"[%b %d %H:%M:%S] Also output vcf")
bcftools view germline_PASS.bcf > germline_PASS.vcf
echo $(date +"[%b %d %H:%M:%S] All done!")