|
1
|
1 <tool id="QDNAseq" name="QDNAseq" version="0.0.1">
|
|
|
2
|
|
|
3 <requirements>
|
|
24
|
4 <!-- <requirement type="set_environment">QDNASEQ_SCRIPT_PATH</requirement> -->
|
|
52
|
5 <!-- R 3.1.0 dependency will be used instead when available, now default R see command -->
|
|
|
6 <!-- <requirement type="package" version="3.1.0">R</requirement> -->
|
|
36
|
7 <requirement type="package" version="0.1.18">samtools</requirement>
|
|
1
|
8 </requirements>
|
|
|
9
|
|
|
10 <description>Quantitative copy number abberation detection</description>
|
|
35
|
11
|
|
36
|
12 <!-- command block to call script with default R environment -->
|
|
47
|
13 <!-- change interpreter to /full/path/to/Rscript if required -->
|
|
61
|
14 <command interpreter="Rscript">
|
|
1
|
15 QDNAseq.R
|
|
36
|
16 $qdnaseq_cfg
|
|
1
|
17 </command>
|
|
|
18
|
|
|
19 <stdio>
|
|
|
20 <!-- Anything higher than 0 means the R script didnt finish -->
|
|
|
21 <!-- Because different R packages deal with err/warn differently unable to waterproof this -->
|
|
|
22 <exit_code range="1:" level="fatal" description="R script didnt finish correctly, check log" />
|
|
|
23 </stdio>
|
|
|
24
|
|
|
25 <inputs>
|
|
|
26 <!-- ==================== -->
|
|
|
27 <!-- General inputs -->
|
|
|
28 <!-- ==================== -->
|
|
|
29 <param name="jobName" type="text" optional="false" label="Analysis/ouput name" help="Supply a name for the outputs to remind you what they contain" value="TEST">
|
|
|
30 <validator type="empty_field" />
|
|
|
31 <validator type="regex" message="This field should contain some non-whitespace character">.*\S</validator>
|
|
|
32 </param>
|
|
|
33 <param name="binSize" type="select" label="Select bin-size to use (kb)" help="Larger bin sizes provide faster analysis but lower resolution">
|
|
|
34 <option value="1000">1Mb</option>
|
|
|
35 <option value="100">100kb</option>
|
|
|
36 <option value="30">30kb</option>
|
|
|
37 <option value="15">15kb</option>
|
|
|
38 <option value="5">5kb</option>
|
|
|
39 <option value="1">1kb</option>
|
|
|
40 </param>
|
|
43
|
41
|
|
60
|
42 <param name="doCall" type="select" label="Also segment and call with CGHcall" help="Segmenting and calling can take significant computational time">
|
|
44
|
43 <option value="TRUE">yes</option>
|
|
|
44 <option value="FALSE">no</option>
|
|
|
45 </param>
|
|
|
46
|
|
1
|
47 <param name="experimentType" type="select" label="Type of sequencing data" help="Currently only single end reads of lenght 50 are supported within galaxy">
|
|
43
|
48 <option value="SR50">Single Reads of 50bp</option>
|
|
1
|
49 <!-- <option value="PE1000">PairedEnd1000</option> -->
|
|
|
50 </param>
|
|
|
51
|
|
|
52 <!-- ==================== -->
|
|
|
53 <!-- Input BAMs -->
|
|
|
54 <!-- ==================== -->
|
|
43
|
55 <param name="bams" type="data" multiple="true" optional="false" format="bam" label="Input BAMs" help="Select the BAM files to analyze" />
|
|
1
|
56
|
|
|
57 <!-- ==================== -->
|
|
|
58 <!-- This section contains galaxy history output settings -->
|
|
|
59 <!-- ==================== -->
|
|
|
60 <conditional name="extra_history_outputs">
|
|
43
|
61 <param name="show" type="select" label="Optional history outputs">
|
|
1
|
62 <option value="NO">Only output Report to history</option>
|
|
|
63 <option value="YES">Select additional history outputs</option>
|
|
|
64 </param>
|
|
|
65 <when value="YES">
|
|
|
66 <param name="readcounts_rds" type="select" label="Also output readcounts RDS (R object) to history">
|
|
|
67 <option value="FALSE">no</option>
|
|
|
68 <option value="TRUE">yes</option>
|
|
|
69 </param>
|
|
|
70 <param name="copynumbers_rds" type="select" label="Also output copynumbers RDS (R object) to history">
|
|
|
71 <option value="FALSE">no</option>
|
|
|
72 <option value="TRUE">yes</option>
|
|
|
73 </param>
|
|
|
74 <param name="calls_rds" type="select" label="Also output called segments RDS (R object) to history">
|
|
|
75 <option value="FALSE">no</option>
|
|
|
76 <option value="TRUE">yes</option>
|
|
|
77 </param>
|
|
|
78 </when>
|
|
60
|
79 <param name="copynumbers_igv" type="select" label="Also output copynumbers IGV file to history">
|
|
|
80 <option value="FALSE">no</option>
|
|
|
81 <option value="TRUE">yes</option>
|
|
|
82 </param>
|
|
1
|
83 <when value="NO">
|
|
|
84 <param name="readcounts_rds" type="hidden" value="FALSE" />
|
|
|
85 <param name="copynumbers_rds" type="hidden" value="FALSE" />
|
|
|
86 <param name="calls_rds" type="hidden" value="FALSE" />
|
|
60
|
87 <param name="copynumbers_igv" type="hidden" value="FALSE" />
|
|
1
|
88 </when>
|
|
|
89 </conditional>
|
|
|
90
|
|
|
91 <!-- ==================== -->
|
|
|
92 <!-- Option to use your own bin annotations -->
|
|
|
93 <!-- ==================== -->
|
|
|
94 <conditional name="use_own_binannotation">
|
|
|
95 <param name="show" type="select" label="Use your own bin annotations from history">
|
|
|
96 <option value="no">no</option>
|
|
|
97 <option value="yes">yes</option>
|
|
|
98 </param>
|
|
|
99 <when value="yes">
|
|
|
100 <param name="binannotation_file" type="data" multiple="false" format="rds" label="R data structure file with bin-annotations" help="If you made your own bin-annotations with the QDNAseq bioconductor package you can upload them to your history and select here" />
|
|
|
101 </when>
|
|
|
102 <when value="no">
|
|
|
103 <param name="binannotation_file" type="hidden" value="" />
|
|
|
104 </when>
|
|
|
105 </conditional>
|
|
|
106 <!-- ==================== -->
|
|
|
107 <!-- Optional advanced options -->
|
|
|
108 <!-- ==================== -->
|
|
|
109 <conditional name="advanced">
|
|
|
110 <param name="show" type="select" label="Show advanced options">
|
|
|
111 <option value="no">no</option>
|
|
|
112 <option value="yes">yes</option>
|
|
|
113 </param>
|
|
|
114 <when value="yes">
|
|
|
115
|
|
|
116 <param name="undo_splits" type="select" label="undoSplits" help="If set to sdundo, see undoSD below">
|
|
|
117 <option value="sdundo">sdundo</option>
|
|
|
118 <option value="prune">prune</option>
|
|
|
119 <option value="none">none</option>
|
|
|
120 </param>
|
|
|
121
|
|
|
122 <param name="undoSD" size="10" type="float" value="1" label="undoSD" help='The number of SDs between means to keep a split if undo.splits="sdundo".' />
|
|
|
123
|
|
|
124 <param name="blacklist" type="select" label="Filter blacklisted bins (blacklist)" help="Will exclude all blacklisted bins in the binannotation if set">
|
|
|
125 <option value="TRUE">yes</option>
|
|
|
126 <option value="FALSE">no</option>
|
|
|
127 </param>
|
|
|
128
|
|
|
129 <param name="mappability" type="integer" value="0" min="0" max="100" label="Filter bins with lower mappability" help="Will exclude all bins will lower mappability than this number (0-100)" />
|
|
|
130
|
|
36
|
131 <param name="debug" type="select" label="DEBUG / TEST" help="Use inbuilt LGG data instead of input BAMs">
|
|
1
|
132 <option value="FALSE">no</option>
|
|
|
133 <option value="TRUE">yes</option>
|
|
|
134 </param>
|
|
|
135 </when>
|
|
|
136 <!-- need to set defaults because params are passed to R anyway -->
|
|
|
137 <when value="no">
|
|
|
138 <param name="undoSD" type="hidden" value="1" />
|
|
|
139 <param name="undo_splits" type="hidden" value="sdundo" />
|
|
|
140 <param name="blacklist" type="hidden" value="TRUE" />
|
|
|
141 <param name="mappability" type="hidden" value="0" />
|
|
|
142 <param name="debug" type="hidden" value="FALSE" />
|
|
|
143 </when>
|
|
|
144 </conditional>
|
|
|
145
|
|
|
146 <!-- ==================== -->
|
|
|
147 <!-- Optional graphical/plotting options -->
|
|
|
148 <!-- ==================== -->
|
|
|
149 <conditional name="plot_options">
|
|
|
150 <param name="show" type="select" label="Show graphical options">
|
|
|
151 <option value="no">no</option>
|
|
|
152 <option value="yes">yes</option>
|
|
|
153 </param>
|
|
|
154 <when value="yes">
|
|
|
155 <param name="plot_width" size="3" type="integer" value="960" label="Plot width" />
|
|
|
156 <param name="plot_height" size="3" type="integer" value="480" label="Plot height" />
|
|
|
157 <param name="exclude_chrs" type="select" multiple="true" label="Hide these chromosomes in plots" help="Currently only standard human chromosomes supported. NOTE: other filters might also exclude chromosomes">
|
|
|
158 <option value="1">1</option>
|
|
|
159 <option value="2">2</option>
|
|
|
160 <option value="3">3</option>
|
|
|
161 <option value="4">4</option>
|
|
|
162 <option value="5">5</option>
|
|
|
163 <option value="6">6</option>
|
|
|
164 <option value="7">7</option>
|
|
|
165 <option value="8">8</option>
|
|
|
166 <option value="9">9</option>
|
|
|
167 <option value="10">10</option>
|
|
|
168 <option value="11">11</option>
|
|
|
169 <option value="12">12</option>
|
|
|
170 <option value="13">13</option>
|
|
|
171 <option value="14">14</option>
|
|
|
172 <option value="15">15</option>
|
|
|
173 <option value="16">16</option>
|
|
|
174 <option value="17">17</option>
|
|
|
175 <option value="18">18</option>
|
|
|
176 <option value="19">19</option>
|
|
|
177 <option value="20">20</option>
|
|
|
178 <option value="21">21</option>
|
|
|
179 <option value="22">22</option>
|
|
|
180 <option value="X" selected="true">X</option>
|
|
|
181 <option value="Y" selected="true">Y</option>
|
|
|
182 </param>
|
|
|
183 </when>
|
|
|
184 <when value="no">
|
|
|
185 <param name="plot_width" type="hidden" value="960" />
|
|
|
186 <param name="plot_height" type="hidden" value="480" />
|
|
|
187 <param name="exclude_chrs" type="hidden" value="X,Y" />
|
|
|
188 </when>
|
|
|
189 </conditional>
|
|
|
190 </inputs>
|
|
|
191 <!-- ==================== -->
|
|
|
192 <!-- This config is sourced in R code -->
|
|
|
193 <!-- ==================== -->
|
|
|
194 <configfiles>
|
|
|
195 <configfile name="qdnaseq_cfg">
|
|
|
196 ## this file was sourced in QDNAseq R wrapper script
|
|
|
197 ## in this way all galaxy params are passes to R
|
|
|
198
|
|
|
199 ## required params
|
|
|
200 as.integer( "${binSize}" ) -> binSize
|
|
|
201 "${experimentType}" -> experimentType
|
|
|
202 "${jobName}" -> outputName
|
|
|
203
|
|
|
204 ## extra params
|
|
|
205 "${htmlFile}" -> outputHtml
|
|
|
206 "${htmlFile.files_path}" -> outputPath
|
|
|
207 "${use_own_binannotation.binannotation_file}" -> binAnnotations
|
|
44
|
208 as.logical( "${doCall}" ) -> doCall
|
|
1
|
209
|
|
|
210 ## advanced options
|
|
|
211 as.double( "${advanced.undoSD}" ) -> undoSD
|
|
|
212 as.logical( "${advanced.debug}" ) -> debug
|
|
|
213 as.logical( "${advanced.blacklist}" ) -> filterBlacklistedBins
|
|
|
214 as.integer( "${advanced.mappability}" ) -> mappabilityCutoff
|
|
|
215 "${advanced.undo_splits}" -> undoSplits
|
|
|
216
|
|
|
217 ## history output params
|
|
|
218 as.logical( "${extra_history_outputs.readcounts_rds}" ) -> doOutputReadcountsRds
|
|
|
219 as.logical( "${extra_history_outputs.copynumbers_rds}" ) -> doOutputCopynumbersRds
|
|
|
220 as.logical( "${extra_history_outputs.calls_rds}" ) -> doOutputCallsRds
|
|
60
|
221 as.logical( "${extra_history_outputs.copynumbers_igv}" ) -> doOutputCopynumbersIgv
|
|
1
|
222 "${rdsReadCounts}" -> readCountsDatasetFile
|
|
|
223 "${rdsCopyNumbers}" -> copyNumbersDatasetFile
|
|
|
224 "${rdsCalls}" -> calledSegmentsDatasetFile
|
|
60
|
225 "${igvCopyNumbers}" -> copyNumbersIgvDatasetFile
|
|
1
|
226
|
|
|
227 ## plotting params
|
|
|
228 as.integer( "${plot_options.plot_width}" ) -> PLOT_WIDTH
|
|
|
229 as.integer( "${plot_options.plot_height}" ) -> PLOT_HEIGHT
|
|
|
230 "${plot_options.exclude_chrs}" -> excludeChrsString
|
|
|
231
|
|
|
232 ## input BAMs init
|
|
|
233 c() -> bamsPaths
|
|
|
234 c() -> bamsNames
|
|
|
235
|
|
|
236 #for bam in $bams#
|
|
|
237 c( bamsPaths, "${bam}" ) -> bamsPaths
|
|
|
238 c( bamsNames, "${bam.name}" ) -> bamsNames
|
|
|
239 #end for
|
|
|
240
|
|
|
241 </configfile>
|
|
|
242 </configfiles>
|
|
|
243
|
|
|
244 <!-- ==================== -->
|
|
|
245 <!-- Main output is an html based report, additional on request -->
|
|
|
246 <!-- ==================== -->
|
|
|
247 <outputs>
|
|
|
248
|
|
|
249 <data format="html" name="htmlFile" label="QDNAseq Report ${binSize}kb (${jobName})" />
|
|
|
250
|
|
|
251 <data format="rds" name="rdsReadCounts" label="${jobName}_readCounts_${binSize}kb.rds">
|
|
|
252 <filter> extra_history_outputs['readcounts_rds'] == "TRUE" </filter><!-- <filter>("readcounts_rds" in outputs)</filter> -->
|
|
|
253 </data>
|
|
|
254
|
|
|
255 <data format="rds" name="rdsCopyNumbers" label="${jobName}_copyNumbers_${binSize}kb.rds">
|
|
|
256 <filter> extra_history_outputs['copynumbers_rds'] == "TRUE" </filter>
|
|
|
257 </data>
|
|
|
258
|
|
|
259 <data format="rds" name="rdsCalls" label="${jobName}_calls_${binSize}kb.rds">
|
|
|
260 <filter> extra_history_outputs['calls_rds'] == "TRUE" </filter>
|
|
|
261 </data>
|
|
|
262
|
|
60
|
263 <data format="txt" name="igvCopyNumbers" label="${jobName}_copyNumbers_${binSize}kb.igv">
|
|
|
264 <filter> extra_history_outputs['copynumbers_igv'] == "TRUE" </filter>
|
|
|
265 </data>
|
|
|
266
|
|
1
|
267 </outputs>
|
|
|
268
|
|
|
269 <!-- ==================== -->
|
|
|
270 <!-- Tests still to be done -->
|
|
|
271 <!-- ==================== -->
|
|
|
272
|
|
|
273 <!--
|
|
|
274 <tests>
|
|
|
275 <test>
|
|
24
|
276 <param name="input1" value="input1" />
|
|
|
277 <param name="input2" value="input2" />
|
|
1
|
278 </test>
|
|
|
279 </tests>
|
|
|
280 -->
|
|
|
281
|
|
|
282 <help>
|
|
|
283 .. class:: infomark
|
|
|
284
|
|
|
285 **Introduction**
|
|
|
286
|
|
|
287 This tool is a wrapper for the R Bioconductor package QDNAseq_
|
|
|
288
|
|
|
289 .. _QDNAseq: http://www.bioconductor.org/packages/release/bioc/html/QDNAseq.html
|
|
|
290
|
|
|
291 It determines the copy number state of human chromosomes 1 - 22 for (shallow coverage) whole genome sequencing data.
|
|
|
292
|
|
43
|
293 For questions/remarks about the galaxy part of this tool, see contact form here_
|
|
|
294
|
|
|
295 .. _here: http://www.stefs.nl/wp/contact
|
|
|
296
|
|
1
|
297 -----
|
|
|
298
|
|
|
299 .. class:: warningmark
|
|
|
300
|
|
43
|
301 As there is no R 3.1.0 package yet (which is required), the **dependencies** need to be installed by hand and available to the user under which galaxy runs: R (3.1.0) and bioconductor package QDNAseq (>= 1.0.5)
|
|
27
|
302
|
|
|
303 .. class:: warningmark
|
|
|
304
|
|
6
|
305 The input BAMs are expected to be **single end reads of 50bp length** mapped to GRCh37/hg19 genome build. Other experiment setups are currently not supported within galaxy. See the documentation of QDNAseq at bioconductor on how to deal with different setups.
|
|
1
|
306
|
|
|
307 .. class:: warningmark
|
|
|
308
|
|
27
|
309 Requires **internet access** for downloading bin-annotations from bitbucket and to show some styling (css) of the final report
|
|
1
|
310
|
|
|
311 -----
|
|
|
312
|
|
|
313 **Citation**
|
|
|
314
|
|
|
315 For the underlying tool please cite: llari Scheinin, Daoud Sie et al. DNA copy number analysis of fresh and formalin-fixed specimens by whole-genome sequencing: improved correction of systematic biases and exclusion of problematic regions, (submitted). See also the bioconductor package_ documentation.
|
|
|
316
|
|
|
317 .. _package: http://www.bioconductor.org/packages/release/bioc/html/QDNAseq.html
|
|
24
|
318
|
|
|
319
|
|
38
|
320 .. image:: LGG150_copynumber_example.png
|
|
43
|
321 .. image:: LGG150_calls_example.png
|
|
1
|
322 </help>
|
|
|
323
|
|
24
|
324 </tool>
|