-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.txt
executable file
·48 lines (39 loc) · 1.3 KB
/
commands.txt
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
## Commands
This section lists command(s) run by WORKFLOW workflow
* Running WORKFLOW
```
<<<
python3<<CODE
import subprocess
import sys
inputStrings = []
v = "~{sep=' ' inputVcfs}"
vcfFiles = v.split()
w = "~{sep=' ' workflows}"
workflowIds = w.split()
priority = "~{priority}"
if len(vcfFiles) != len(workflowIds):
print("The arrays with input files and their respective workflow names are not of equal size!")
else:
for f in range(0, len(vcfFiles)):
inputStrings.append("--variant:" + workflowIds[f] + " " + vcfFiles[f])
javaMemory = ~{jobMemory} - 6
gatkCommand = "$JAVA_ROOT/bin/java -Xmx" + str(javaMemory) + "G -jar $GATK_ROOT/GenomeAnalysisTK.jar "
gatkCommand += "-T CombineVariants "
gatkCommand += " ".join(inputStrings)
gatkCommand += " -R ~{referenceFasta} "
gatkCommand += "-o ~{outputPrefix}_combined.vcf.gz "
gatkCommand += "-genotypeMergeOptions PRIORITIZE "
gatkCommand += "-priority " + priority
gatkCommand += " 2>&1"
result_output = subprocess.run(gatkCommand, shell=True)
sys.exit(result_output.returncode)
CODE
>>>
```
```
bcftools annotate -a ~{uniqueVcf} \
-c FMT/AD,FMT/DP ~{mergedVcf} -Oz \
-o "~{outputPrefix}.merged.vcf.gz"
tabix -p vcf "~{outputPrefix}.merged.vcf.gz"
```