-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelGenotype.sh
74 lines (57 loc) · 1.89 KB
/
delGenotype.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
## SVDiscovery targeting deletion spanning 100 bp - 1M bp
# group names, t for tumor/normal, c for cancer type
t=$1
c=$2
## the path to master directory containing genomestrip scripts, input dependencies and output directories
mainRunDir=$3
# input BAM
inputDir=${mainRunDir}"inputs/"
batchbamMapFile=$4
## input dependencies
genderMap=$5
## the dir name inside the input directory
refDir=Homo_sapiens_assembly19
refFile=${refDir}/Homo_sapiens_assembly19.fasta
# output directory
batchName=$6
runDir=${mainRunDir}"outputs/"${batchName}"/"${t}"_"${c}"/"
outDir=${runDir}"delGenotype/"
## input vcf file
inVCF=${runDir}"svDiscovery/discovery_"${t}"_"${c}".vcf"
## output vcf file
outVCF=${outDir}"del_genotype_"${t}"_"${c}".vcf"
## maximum heap memory
mx="-Xmx5g"
# input dependencies
export SV_DIR=/opt/svtoolkit
# tempory dir
SV_TMPDIR=${runDir}/tmpdir
# For SVAltAlign, you must use the version of bwa compatible with Genome STRiP.
export PATH=${SV_DIR}/bwa:${PATH}
export LD_LIBRARY_PATH=${SV_DIR}/bwa:${LD_LIBRARY_PATH}
classpath="${SV_DIR}/lib/SVToolkit.jar:${SV_DIR}/lib/gatk/GenomeAnalysisTK.jar:${SV_DIR}/lib/gatk/Queue.jar"
mkdir -p ${outDir} || exit 1
cp $0 ${outDir}/
# Run genotyping on the discovered sites.
java -cp ${classpath} ${mx} \
org.broadinstitute.gatk.queue.QCommandLine \
-S ${SV_DIR}/qscript/SVGenotyper.q \
-S ${SV_DIR}/qscript/SVQScript.q \
-gatk ${SV_DIR}/lib/gatk/GenomeAnalysisTK.jar \
--disableJobReport \
-jobRunner ParallelShell \
-cp ${classpath} \
-configFile ${SV_DIR}/conf/genstrip_parameters.txt \
-tempDir ${SV_TMPDIR} \
-R ${inputDir}${refFile} \
-genderMapFile ${inputDir}${genderMap} \
-runDirectory ${outDir} \
-md ${runDir}"metadata" \
-jobLogDir ${runDir}"logs" \
-I ${inputDir}${batchbamMapFile} \
-vcf ${inVCF} \
-O ${outVCF} \
-P select.validateReadPairs:false \
-run \
|| exit 1