-
Notifications
You must be signed in to change notification settings - Fork 1
/
simpleVariantSelection.wdl
76 lines (71 loc) · 1.66 KB
/
simpleVariantSelection.wdl
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
75
76
workflow SimpleVariantSelection {
File gatk
File refFasta
File refIndex
File refDict
String name
call haplotypeCaller {
input: sampleName=name,
RefFasta=refFasta,
GATK=gatk,
RefIndex=refIndex,
RefDict=refDict
}
call select as selectSNPs {
input: sampleName=name,
RefFasta=refFasta,
GATK=gatk,
RefIndex=refIndex,
RefDict=refDict,
type="SNP",
rawVCF=haplotypeCaller.rawVCF
}
call select as selectIndels {
input: sampleName=name,
RefFasta=refFasta,
GATK=gatk,
RefIndex=refIndex,
RefDict=refDict,
type="INDEL",
rawVCF=haplotypeCaller.rawVCF
}
}
task haplotypeCaller {
File GATK
File RefFasta
File RefIndex
File RefDict
String sampleName
File inputBAM
File bamIndex
command {
java -jar ${GATK} \
-T HaplotypeCaller \
-R ${RefFasta} \
-I ${inputBAM} \
-o ${sampleName}.raw.indels.snps.vcf
}
output {
File rawVCF = "${sampleName}.raw.indels.snps.vcf"
}
}
task select {
File GATK
File RefFasta
File RefIndex
File RefDict
String sampleName
String type
File rawVCF
command {
java -jar ${GATK} \
-T SelectVariants \
-R ${RefFasta} \
-V ${rawVCF} \
-selectType ${type} \
-o ${sampleName}_raw.${type}.vcf
}
output {
File rawSubset = "${sampleName}_raw.${type}.vcf"
}
}