generated from biowdl/pipeline-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pairedCnvCalling.wdl
169 lines (159 loc) · 9.76 KB
/
pairedCnvCalling.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
version 1.0
# Copyright (c) 2020 Leiden University Medical Center
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import "sample.wdl" as sampleWorkflow
workflow PairedCnvCalling {
input {
String caseSampleName
File caseBam
File caseBamIndex
String controlSampleName
File controlBam
File controlBamIndex
File? PON
File? annotatedIntervals
File preprocessedIntervals
File commonVariantSites
File? commonVariantSitesIndex
String outputDir = "."
File referenceFasta
File referenceFastaDict
File referenceFastaFai
Int? minimumContigLength
Map[String, String] dockerImages = {
"gatk": "broadinstitute/gatk:4.1.8.0" # There are some issues with the biocontainer
}
}
call sampleWorkflow.Sample as controlSample {
input:
preprocessedIntervals = preprocessedIntervals,
PON = PON,
annotatedIntervals = annotatedIntervals,
inputBam = controlBam,
inputBamIndex = controlBamIndex,
commonVariantSites = commonVariantSites,
commonVariantSitesIndex = commonVariantSitesIndex,
sampleName = controlSampleName,
referenceFasta = referenceFasta,
referenceFastaDict = referenceFastaDict,
referenceFastaFai = referenceFastaFai,
minimumContigLength = minimumContigLength,
outputDir = outputDir + "/" + controlSampleName + "/",
dockerImages = dockerImages
}
call sampleWorkflow.Sample as caseSample {
input:
preprocessedIntervals = preprocessedIntervals,
PON = PON,
annotatedIntervals = annotatedIntervals,
matchedNormalAllelicCounts = controlSample.allelicCounts,
inputBam = caseBam,
inputBamIndex = caseBamIndex,
commonVariantSites = commonVariantSites,
commonVariantSitesIndex = commonVariantSitesIndex,
sampleName = caseSampleName,
referenceFasta = referenceFasta,
referenceFastaDict = referenceFastaDict,
referenceFastaFai = referenceFastaFai,
minimumContigLength = minimumContigLength,
outputDir = outputDir + "/" + caseSampleName + "/",
dockerImages = dockerImages
}
output {
File caseAllelicCounts = caseSample.allelicCounts
File caseReadCounts = caseSample.readCounts
File caseStandardizedCopyRatios = caseSample.standardizedCopyRatios
File caseDenoisedCopyRatios = caseSample.denoisedCopyRatios
File caseHetrozygousAllelicCounts = caseSample.hetrozygousAllelicCounts
File caseNormalHetrozygousAllelicCounts = select_first([caseSample.normalHetrozygousAllelicCounts])
File caseCopyRatioSegments = caseSample.copyRatioSegments
File caseCopyRatioCBS = caseSample.copyRatioCBS
File caseAlleleFractionCBS = caseSample.alleleFractionCBS
File caseUnsmoothedModeledSegments = caseSample.unsmoothedModeledSegments
File caseUnsmoothedCopyRatioParameters = caseSample.unsmoothedCopyRatioParameters
File caseUnsmoothedAlleleFractionParameters = caseSample.unsmoothedAlleleFractionParameters
File caseModeledSegments = caseSample.modeledSegments
File caseCopyRatioParameters = caseSample.copyRatioParameters
File caseAlleleFractionParameters = caseSample.alleleFractionParameters
File caseCalledSegments = caseSample.calledSegments
File caseCalledSegmentsIgv = caseSample.calledSegmentsIgv
File caseDenoisedCopyRatiosPlot = caseSample.denoisedCopyRatiosPlot
File? caseDenoisedCopyRatiosLimitedPlot = caseSample.denoisedCopyRatiosLimitedPlot
File caseStandardizedMedianAbsoluteDeviation = caseSample.standardizedMedianAbsoluteDeviation
File caseDenoisedMedianAbsoluteDeviation = caseSample.denoisedMedianAbsoluteDeviation
File caseDeltaMedianAbsoluteDeviation = caseSample.deltaMedianAbsoluteDeviation
File caseDeltaScaledMedianAbsoluteDeviation = caseSample.deltaScaledMedianAbsoluteDeviation
File caseModeledSegmentsPlot = caseSample.modeledSegmentsPlot
File controlAllelicCounts = controlSample.allelicCounts
File controlReadCounts = controlSample.readCounts
File controlStandardizedCopyRatios = controlSample.standardizedCopyRatios
File controlDenoisedCopyRatios = controlSample.denoisedCopyRatios
File controlHetrozygousAllelicCounts = controlSample.hetrozygousAllelicCounts
File controlCopyRatioSegments = controlSample.copyRatioSegments
File controlCopyRatioCBS = controlSample.copyRatioCBS
File controlAlleleFractionCBS = controlSample.alleleFractionCBS
File controlUnsmoothedModeledSegments = controlSample.unsmoothedModeledSegments
File controlUnsmoothedCopyRatioParameters = controlSample.unsmoothedCopyRatioParameters
File controlUnsmoothedAlleleFractionParameters = controlSample.unsmoothedAlleleFractionParameters
File controlModeledSegments = controlSample.modeledSegments
File controlCopyRatioParameters = controlSample.copyRatioParameters
File controlAlleleFractionParameters = controlSample.alleleFractionParameters
File controlCalledSegments = controlSample.calledSegments
File controlCalledSegmentsIgv = controlSample.calledSegmentsIgv
File controlDenoisedCopyRatiosPlot = controlSample.denoisedCopyRatiosPlot
File? controlDenoisedCopyRatiosLimitedPlot = controlSample.denoisedCopyRatiosLimitedPlot
File controlStandardizedMedianAbsoluteDeviation = controlSample.standardizedMedianAbsoluteDeviation
File controlDenoisedMedianAbsoluteDeviation = controlSample.denoisedMedianAbsoluteDeviation
File controlDeltaMedianAbsoluteDeviation = controlSample.deltaMedianAbsoluteDeviation
File controlDeltaScaledMedianAbsoluteDeviation = controlSample.deltaScaledMedianAbsoluteDeviation
File controlModeledSegmentsPlot = controlSample.modeledSegmentsPlot
}
parameter_meta {
caseSampleName: {description: "The name of the case sample.", category: "required"}
caseBam: {description: "The BAM file for the case sample.", category: "required"}
caseBamIndex: {description: "The index for the case sample's BAM file.", category: "required"}
controlSampleName: {description: "The name of the control sample.", category: "required"}
controlBam: {description: "The BAM file for the control sample.", category: "required"}
controlBamIndex: {description: "The index for the control sample's BAM file.", category: "required"}
preprocessedIntervals: {description: "Intervals to operate on. Should be produced by gatk PreprocessIntervals (eg. using CNV-PON.wdl).",
category: "required"}
PON: {description: "A read counts panel of normals as generated by gatk CreateReadCountPanelOfNormals (eg. using CNV-PON.wdl).",
category: "common"}
annotatedIntervals: {description: "An annotated set of intervals as generated by AnnotateIntervals (eg. using CNV-PON.wdl). Will be ignored if PON is provided.",
category: "common"}
matchedNormalAllelicCounts: {description: "The allelicCounts as generate by CollectAllelicCounts for a matched normal.", category: "common"}
commonVariantSites: {description: "Interval list or VCF file of common variant sites (to retrieve the allelic counts for). Preferably a list variants from the sample being analysed. For targeted/exome sequencing the list should be limited to variants within the sequenced regions, due to memory usage.", category: "required"}
commonVariantSitesIndex: {description: "The index for commonVariantSitesIndex.", category: "common"}
sampleName: {description: "The name of the sample, used for file naming.", category: "required"}
referenceFasta: {description: "The reference fasta file.", category: "required"}
referenceFastaDict: {description: "The sequence dictionary associated with the reference fasta file.", category: "required"}
referenceFastaFai: {description: "The index for the reference fasta file.", category: "required"}
outputDir: {description: "The directory the output should be written to.", category: "common"}
minimumContigLength: {description: "The minimum length for a contig to be included in the plots.", category: "advanced"}
dockerImages: {description: "The docker images used. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"}
}
meta {
WDL_AID: {
exclude: ["controlSample.matchedNormalAllelicCounts"]
}
allowNestedInputs: true
}
}