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