1
|
1 <tool id="QDNAseq" name="QDNAseq" version="0.0.1">
|
|
2
|
|
3 <requirements>
|
24
|
4 <!-- <requirement type="set_environment">QDNASEQ_SCRIPT_PATH</requirement> -->
|
|
5 <!-- The R package for v3.1.0 is not ready yet -->
|
36
|
6 <!-- <requirement type="package" version="3.1.0">R</requirement>-->
|
|
7 <requirement type="package" version="0.1.18">samtools</requirement>
|
24
|
8 <!-- <requirement type="package" version="1.0.5">bioc_qdnaseq</requirement> -->
|
1
|
9 </requirements>
|
|
10
|
|
11 <description>Quantitative copy number abberation detection</description>
|
|
12
|
36
|
13 <!-- command block to call script with specific R installation (set full paths) -->
|
|
14 <!--
|
35
|
15 <command>
|
36
|
16 /full/path/to/Rscript
|
|
17 /full/path/to/QDNAseq.R
|
35
|
18 $qdnaseq_cfg
|
|
19 </command>
|
|
20 -->
|
|
21
|
36
|
22 <!-- command block to call script with default R environment -->
|
1
|
23 <command interpreter="Rscript">
|
|
24 QDNAseq.R
|
36
|
25 $qdnaseq_cfg
|
1
|
26 </command>
|
|
27
|
|
28 <stdio>
|
|
29 <!-- Anything higher than 0 means the R script didnt finish -->
|
|
30 <!-- Because different R packages deal with err/warn differently unable to waterproof this -->
|
|
31 <exit_code range="1:" level="fatal" description="R script didnt finish correctly, check log" />
|
|
32 </stdio>
|
|
33
|
|
34 <inputs>
|
|
35 <!-- ==================== -->
|
|
36 <!-- General inputs -->
|
|
37 <!-- ==================== -->
|
|
38 <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">
|
|
39 <validator type="empty_field" />
|
|
40 <validator type="regex" message="This field should contain some non-whitespace character">.*\S</validator>
|
|
41 </param>
|
|
42 <param name="binSize" type="select" label="Select bin-size to use (kb)" help="Larger bin sizes provide faster analysis but lower resolution">
|
|
43 <option value="1000">1Mb</option>
|
|
44 <option value="100">100kb</option>
|
|
45 <option value="30">30kb</option>
|
|
46 <option value="15">15kb</option>
|
|
47 <option value="5">5kb</option>
|
|
48 <option value="1">1kb</option>
|
|
49 </param>
|
|
50 <param name="doCall" type="select" label="Also segment and call with CGHcall" help="This setting will be set to yes if called output is requested (see additional history outputs)">
|
|
51 <option value="TRUE">yes</option>
|
|
52 <option value="FALSE">no</option>
|
|
53 </param>
|
|
54 <param name="experimentType" type="select" label="Type of sequencing data" help="Currently only single end reads of lenght 50 are supported within galaxy">
|
|
55 <option value="SR50">Single Read 50bp</option>
|
|
56 <!-- <option value="PE1000">PairedEnd1000</option> -->
|
|
57 </param>
|
|
58
|
|
59 <!-- ==================== -->
|
|
60 <!-- Input BAMs -->
|
|
61 <!-- ==================== -->
|
|
62 <param name="bams" type="data" multiple="true" optional="false" format="bam" label="Input BAMs" help="Select all BAM files to include in the analysis" />
|
|
63
|
|
64 <!-- ==================== -->
|
|
65 <!-- This section contains galaxy history output settings -->
|
|
66 <!-- ==================== -->
|
|
67 <conditional name="extra_history_outputs">
|
|
68 <param name="show" type="select" label="Show additional history outputs">
|
|
69 <option value="NO">Only output Report to history</option>
|
|
70 <option value="YES">Select additional history outputs</option>
|
|
71 </param>
|
|
72 <when value="YES">
|
|
73 <param name="readcounts_rds" type="select" label="Also output readcounts RDS (R object) to history">
|
|
74 <option value="FALSE">no</option>
|
|
75 <option value="TRUE">yes</option>
|
|
76 </param>
|
|
77 <param name="copynumbers_rds" type="select" label="Also output copynumbers RDS (R object) to history">
|
|
78 <option value="FALSE">no</option>
|
|
79 <option value="TRUE">yes</option>
|
|
80 </param>
|
|
81 <param name="calls_rds" type="select" label="Also output called segments RDS (R object) to history">
|
|
82 <option value="FALSE">no</option>
|
|
83 <option value="TRUE">yes</option>
|
|
84 </param>
|
|
85 </when>
|
|
86 <when value="NO">
|
|
87 <param name="readcounts_rds" type="hidden" value="FALSE" />
|
|
88 <param name="copynumbers_rds" type="hidden" value="FALSE" />
|
|
89 <param name="calls_rds" type="hidden" value="FALSE" />
|
|
90 </when>
|
|
91 </conditional>
|
|
92
|
|
93 <!-- ==================== -->
|
|
94 <!-- Option to use your own bin annotations -->
|
|
95 <!-- ==================== -->
|
|
96 <conditional name="use_own_binannotation">
|
|
97 <param name="show" type="select" label="Use your own bin annotations from history">
|
|
98 <option value="no">no</option>
|
|
99 <option value="yes">yes</option>
|
|
100 </param>
|
|
101 <when value="yes">
|
|
102 <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" />
|
|
103 </when>
|
|
104 <when value="no">
|
|
105 <param name="binannotation_file" type="hidden" value="" />
|
|
106 </when>
|
|
107 </conditional>
|
|
108 <!-- ==================== -->
|
|
109 <!-- Optional advanced options -->
|
|
110 <!-- ==================== -->
|
|
111 <conditional name="advanced">
|
|
112 <param name="show" type="select" label="Show advanced options">
|
|
113 <option value="no">no</option>
|
|
114 <option value="yes">yes</option>
|
|
115 </param>
|
|
116 <when value="yes">
|
|
117
|
|
118 <param name="undo_splits" type="select" label="undoSplits" help="If set to sdundo, see undoSD below">
|
|
119 <option value="sdundo">sdundo</option>
|
|
120 <option value="prune">prune</option>
|
|
121 <option value="none">none</option>
|
|
122 </param>
|
|
123
|
|
124 <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".' />
|
|
125
|
|
126 <param name="blacklist" type="select" label="Filter blacklisted bins (blacklist)" help="Will exclude all blacklisted bins in the binannotation if set">
|
|
127 <option value="TRUE">yes</option>
|
|
128 <option value="FALSE">no</option>
|
|
129 </param>
|
|
130
|
|
131 <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)" />
|
|
132
|
36
|
133 <param name="debug" type="select" label="DEBUG / TEST" help="Use inbuilt LGG data instead of input BAMs">
|
1
|
134 <option value="FALSE">no</option>
|
|
135 <option value="TRUE">yes</option>
|
|
136 </param>
|
|
137 </when>
|
|
138 <!-- need to set defaults because params are passed to R anyway -->
|
|
139 <when value="no">
|
|
140 <param name="undoSD" type="hidden" value="1" />
|
|
141 <param name="undo_splits" type="hidden" value="sdundo" />
|
|
142 <param name="blacklist" type="hidden" value="TRUE" />
|
|
143 <param name="mappability" type="hidden" value="0" />
|
|
144 <param name="debug" type="hidden" value="FALSE" />
|
|
145 </when>
|
|
146 </conditional>
|
|
147
|
|
148 <!-- ==================== -->
|
|
149 <!-- Optional graphical/plotting options -->
|
|
150 <!-- ==================== -->
|
|
151 <conditional name="plot_options">
|
|
152 <param name="show" type="select" label="Show graphical options">
|
|
153 <option value="no">no</option>
|
|
154 <option value="yes">yes</option>
|
|
155 </param>
|
|
156 <when value="yes">
|
|
157 <param name="plot_width" size="3" type="integer" value="960" label="Plot width" />
|
|
158 <param name="plot_height" size="3" type="integer" value="480" label="Plot height" />
|
|
159 <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">
|
|
160 <option value="1">1</option>
|
|
161 <option value="2">2</option>
|
|
162 <option value="3">3</option>
|
|
163 <option value="4">4</option>
|
|
164 <option value="5">5</option>
|
|
165 <option value="6">6</option>
|
|
166 <option value="7">7</option>
|
|
167 <option value="8">8</option>
|
|
168 <option value="9">9</option>
|
|
169 <option value="10">10</option>
|
|
170 <option value="11">11</option>
|
|
171 <option value="12">12</option>
|
|
172 <option value="13">13</option>
|
|
173 <option value="14">14</option>
|
|
174 <option value="15">15</option>
|
|
175 <option value="16">16</option>
|
|
176 <option value="17">17</option>
|
|
177 <option value="18">18</option>
|
|
178 <option value="19">19</option>
|
|
179 <option value="20">20</option>
|
|
180 <option value="21">21</option>
|
|
181 <option value="22">22</option>
|
|
182 <option value="X" selected="true">X</option>
|
|
183 <option value="Y" selected="true">Y</option>
|
|
184 </param>
|
|
185 </when>
|
|
186 <when value="no">
|
|
187 <param name="plot_width" type="hidden" value="960" />
|
|
188 <param name="plot_height" type="hidden" value="480" />
|
|
189 <param name="exclude_chrs" type="hidden" value="X,Y" />
|
|
190 </when>
|
|
191 </conditional>
|
|
192 </inputs>
|
|
193 <!-- ==================== -->
|
|
194 <!-- This config is sourced in R code -->
|
|
195 <!-- ==================== -->
|
|
196 <configfiles>
|
|
197 <configfile name="qdnaseq_cfg">
|
|
198 ## this file was sourced in QDNAseq R wrapper script
|
|
199 ## in this way all galaxy params are passes to R
|
|
200
|
|
201 ## required params
|
|
202 as.integer( "${binSize}" ) -> binSize
|
|
203 "${experimentType}" -> experimentType
|
|
204 "${jobName}" -> outputName
|
|
205
|
|
206 ## extra params
|
|
207 as.logical( "${doCall}" ) -> doCall
|
|
208 "${htmlFile}" -> outputHtml
|
|
209 "${htmlFile.files_path}" -> outputPath
|
|
210 "${use_own_binannotation.binannotation_file}" -> binAnnotations
|
|
211
|
|
212 ## advanced options
|
|
213 as.double( "${advanced.undoSD}" ) -> undoSD
|
|
214 as.logical( "${advanced.debug}" ) -> debug
|
|
215 as.logical( "${advanced.blacklist}" ) -> filterBlacklistedBins
|
|
216 as.integer( "${advanced.mappability}" ) -> mappabilityCutoff
|
|
217 "${advanced.undo_splits}" -> undoSplits
|
|
218
|
|
219 ## history output params
|
|
220 as.logical( "${extra_history_outputs.readcounts_rds}" ) -> doOutputReadcountsRds
|
|
221 as.logical( "${extra_history_outputs.copynumbers_rds}" ) -> doOutputCopynumbersRds
|
|
222 as.logical( "${extra_history_outputs.calls_rds}" ) -> doOutputCallsRds
|
|
223 "${rdsReadCounts}" -> readCountsDatasetFile
|
|
224 "${rdsCopyNumbers}" -> copyNumbersDatasetFile
|
|
225 "${rdsCalls}" -> calledSegmentsDatasetFile
|
|
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
|
|
263 </outputs>
|
|
264
|
|
265 <!-- ==================== -->
|
|
266 <!-- Tests still to be done -->
|
|
267 <!-- ==================== -->
|
|
268
|
|
269 <!--
|
|
270 <tests>
|
|
271 <test>
|
24
|
272 <param name="input1" value="input1" />
|
|
273 <param name="input2" value="input2" />
|
1
|
274 </test>
|
|
275 </tests>
|
|
276 -->
|
|
277
|
|
278 <help>
|
|
279 .. class:: infomark
|
|
280
|
|
281 **Introduction**
|
|
282
|
|
283 This tool is a wrapper for the R Bioconductor package QDNAseq_
|
|
284
|
|
285 .. _QDNAseq: http://www.bioconductor.org/packages/release/bioc/html/QDNAseq.html
|
|
286
|
|
287 It determines the copy number state of human chromosomes 1 - 22 for (shallow coverage) whole genome sequencing data.
|
|
288
|
|
289 -----
|
|
290
|
|
291 .. class:: warningmark
|
|
292
|
27
|
293 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 galaxy user: R (3.1.0) and bioconductor package QDNAseq (>= 1.0.5)
|
|
294
|
|
295 .. class:: warningmark
|
|
296
|
6
|
297 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
|
298
|
|
299 .. class:: warningmark
|
|
300
|
27
|
301 Requires **internet access** for downloading bin-annotations from bitbucket and to show some styling (css) of the final report
|
1
|
302
|
|
303 -----
|
|
304
|
|
305 **Citation**
|
|
306
|
|
307 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.
|
|
308
|
|
309 .. _package: http://www.bioconductor.org/packages/release/bioc/html/QDNAseq.html
|
24
|
310
|
|
311
|
38
|
312 .. image:: LGG150_copynumber_example.png
|
1
|
313 </help>
|
|
314
|
24
|
315 </tool>
|