comparison mutational_patterns.xml @ 0:d585f369bfad draft

"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mutational_patterns commit 518fb067e8206ecafbf673a5e4cf375ccead11e3"
author artbio
date Fri, 04 Jun 2021 22:35:17 +0000
parents
children c73aa7cc4c4b
comparison
equal deleted inserted replaced
-1:000000000000 0:d585f369bfad
1 <tool id="mutational_patterns" name="Analyse Mutational Patterns/Signatures" version="2.0.0+galaxy14">
2 <description>from genomic variations in vcf files</description>
3 <requirements>
4 <requirement type="package" version="2.0.0=r40_0">bioconductor-mutationalpatterns</requirement>
5 <requirement type="package" version="1.6.6=r40h6115d3f_1">r-optparse</requirement>
6 <requirement type="package" version="0.2.20=r40h0357c0b_1002">r-rjson</requirement>
7 <requirement type="package" version="0.21.0=r40h0357c0b_1004">r-nmf</requirement>
8 <requirement type="package" version="2.3=r40h6115d3f_1003">r-gridextra</requirement>
9 <requirement type="package" version="1.4.3=r40_0">bioconductor-bsgenome.hsapiens.ucsc.hg19</requirement>
10 <requirement type="package" version="1.4.3=r40_0">bioconductor-bsgenome.hsapiens.ucsc.hg38</requirement>
11 <!--
12 <requirement type="package" version="1.3.1000=r40_4">bioconductor-bsgenome.hsapiens.ncbi.grch38</requirement>
13 <requirement type="package" version="0.99.1=r40_4">bioconductor-bsgenome.hsapiens.1000genomes.hs37d5</requirement>
14 -->
15 <!--
16 install more bioconda genomes
17 bioconductor-bsgenome.mmusculus.ucsc.mm9
18 bioconductor-bsgenome.mmusculus.ucsc.mm10
19 -->
20 </requirements>
21 <stdio>
22 <exit_code range="1:" level="fatal" description="Tool exception" />
23 </stdio>
24
25 <command detect_errors="exit_code"><![CDATA[
26 #import json
27 #import os
28 Rscript $__tool_directory__/mutational_patterns.R
29 --inputs
30 #set $filename_to_element_identifiers = {}
31 #for $sample in $vcfs:
32 $filename_to_element_identifiers.__setitem__(str($sample), $sample.element_identifier)
33 #end for
34 '#echo json.dumps(filename_to_element_identifiers)#'
35 --genome '$genome'
36
37 #if $set_levels.choices == 'yes':
38 --levels '$set_levels.levels'
39 #end if
40
41 #if $set_spectrum.choices == 'yes':
42 --output_spectrum $spectrum
43 #end if
44
45 #if $set_denovo.choices == 'yes':
46 --nrun $set_denovo.nrun
47 --rank $set_denovo.rank
48 --newsignum $set_denovo.newsignum
49 --output_denovo $denovo
50 --sigmatrix $sigmatrix
51 #end if
52
53 #if $set_cosmic.choices == 'yes':
54 --cosmic_version '$set_cosmic.cosmic_version'
55 --signum '$set_cosmic.signum'
56 --output_cosmic $cosmic
57 #if $set_cosmic.contrib_matrix_out
58 --sig_contrib_matrix $sig_contrib_matrix
59 #end if
60 #end if
61
62 #if $rdata_out
63 --rdata '$rdata'
64 #end if
65
66 ]]></command>
67 <inputs>
68 <param name="vcfs" type="data_collection" format="vcf" label="VCF file(s) collection" multiple="true"/>
69 <param name="genome" type="select" label="Reference Genome">
70 <!-- <option value="BSgenome.Hsapiens.1000genomes.hs37d5">BSgenome.Hsapiens.1000genomes.hs37d5</option> -->
71 <!-- <option value="BSgenome.Hsapiens.NCBI.GRCh38">BSgenome.Hsapiens.NCBI.GRCh38</option> -->
72 <option value="BSgenome.Hsapiens.UCSC.hg19">BSgenome.Hsapiens.UCSC.hg19</option>
73 <option value="BSgenome.Hsapiens.UCSC.hg38" selected="true">BSgenome.Hsapiens.UCSC.hg38</option>
74 <!--<option value="BSgenome.Mmusculus.UCSC.mm10">BSgenome.Mmusculus.UCSC.mm10</option>
75 <option value="BSgenome.Mmusculus.UCSC.mm9">BSgenome.Mmusculus.UCSC.mm9</option>-->
76 </param>
77 <conditional name="set_levels">
78 <param name="choices" type="select" label="samples have levels/labels for grouping them in the analysis" display="radio"
79 help="for instance, female/male or genotype-1/genotype-2/genotype-3, etc.">
80 <option value="no" selected="true">No</option>
81 <option value="yes">Yes</option>
82 </param>
83 <when value="yes">
84 <param name="levels" type="data" format="tabular"
85 label="A two-column tab-separated file describing levels attributed to each sample name"
86 help="Tip: the sample name list in the vcf collection can be obtained using
87 the IUC Galaxy tool 'Extract element identifiers of a list collection' &lt;br&gt;
88 example:&lt;br&gt;
89 sample1 female&lt;br&gt;
90 sample2 female&lt;br&gt;
91 sample3 male&lt;br&gt;
92 sample4 female&lt;br&gt;
93 sample5 male&lt;br&gt;
94 sample5 male" />
95 </when>
96 <when value="no" />
97 </conditional>
98 <conditional name="set_spectrum">
99 <param name="choices" type="select" label="Analyse Mutational Spectrum" display="radio">
100 <option value="yes" selected="true">Yes</option>
101 <option value="no">No</option>
102 </param>
103 <when value="yes" />
104 <when value="no" />
105 </conditional>
106
107 <conditional name="set_denovo">
108 <param name="choices" type="select" label="Extract de novo signatures with MutationalPatterns" display="radio">
109 <option value="yes" selected="true">Yes</option>
110 <option value="no">No</option>
111 </param>
112 <when value="yes">
113 <param name="nrun" type="integer" value="10" min="10" max="200"
114 label="Number of cycles to find best fitting of signatures"
115 help="High values extend the computational time"/>
116 <param name="rank" type="integer" value="4" min="3" max="30"
117 label="Number of ranks to be displayed for control of optimal number of signature"
118 help="High values extend the computational time. In addition the number of ranks cannot be greater than the number of available samples in the study"/>
119 <param name="newsignum" type="integer" value="4" min="2" max="30"
120 label="Number of de novo signatures to capture"
121 help="High values extend the computational time. Note also that you cannot extract more signature than the number of available samples in the study"/>
122 </when>
123 <when value="no" />
124 </conditional>
125
126 <conditional name="set_cosmic">
127 <param name="choices" type="select" label="Decompose with Cosmic signature v2" display="radio">
128 <option value="yes" selected="true">Yes</option>
129 <option value="no">No</option>
130 </param>
131 <when value="yes">
132 <param name="signum" type="integer" value="3" min="2" max="30"
133 label="selects the N most significant signatures in samples to express mutational patterns"
134 help="an integer between 2 and 30 signature types from cosmic"/>
135 <param name="cosmic_version" type="select" label="Version of the Cosmic signature set">
136 <option value="v2" selected="true">Cosmic v2, March 2015</option>
137 <option value="v3">Cosmic v3, May 2019</option>
138 </param>
139 <param name="contrib_matrix_out" type="boolean" checked="false" label="Output Signature Contribution table ?"
140 help="Output the normalized signatures contributions for further visualization" />
141 </when>
142 <when value="no" />
143 </conditional>
144 <param name="rdata_out" type="boolean" checked="false" label="Output RData file?" help="Output all the data used by R to construct the tables and plots, can be loaded into R" />
145 </inputs>
146 <outputs>
147 <data name="spectrum" format="pdf" label="Mutational Spectrum">
148 <filter>set_spectrum['choices'] == "yes"</filter>
149 </data>
150 <data name="denovo" format="pdf" label="De novo signatures">
151 <filter>set_denovo['choices'] == "yes"</filter>
152 </data>
153 <data name="sigmatrix" format="tabular" label="De novo signatures probability matrix">
154 <filter>set_denovo['choices'] == "yes"</filter>
155 </data>
156 <data name="cosmic" format="pdf" label="Cosmic signatures">
157 <filter>set_cosmic['choices'] == "yes"</filter>
158 </data>
159 <data name="sig_contrib_matrix" format="tabular" label="${tool.name}: Signature contribution table">
160 <filter>set_cosmic['contrib_matrix_out']</filter>
161 </data>
162
163 <data name="rdata" format="rdata" label="${tool.name}: RData file">
164 <filter>rdata_out</filter>
165 </data>
166
167 </outputs>
168 <tests>
169 <!-- simple profile -->
170 <test>
171 <param name="vcfs">
172 <collection type="list">
173 <element name="1" ftype="vcf" value="G.vcf"/>
174 <element name="2" ftype="vcf" value="H.vcf"/>
175 </collection>
176 </param>
177 <param name="genome" value="BSgenome.Hsapiens.UCSC.hg38"/>
178 <conditional name="set_levels">
179 <param name="choices" value="yes"/>
180 </conditional>
181 <param name="levels" value="GH_levels.tab" ftype="tabular"/>
182 <conditional name="set_spectrum">
183 <param name="choices" value="yes"/>
184 </conditional>
185 <conditional name="set_denovo">
186 <param name="choices" value="no"/>
187 </conditional>
188 <conditional name="set_cosmic">
189 <param name="choices" value="no"/>
190 </conditional>
191 <output name="spectrum" file="spectrum_output1.pdf" compare="sim_size"/>
192 </test>
193
194 <!-- de novo signatures -->
195 <test>
196 <param name="vcfs">
197 <collection type="list">
198 <element name="6" value="F.vcf"/>
199 <element name="7" value="G.vcf"/>
200 <element name="8" value="H.vcf"/>
201 <element name="9" value="I.vcf"/>
202 </collection>
203 </param>
204 <param name="genome" value="BSgenome.Hsapiens.UCSC.hg38"/>
205 <conditional name="set_spectrum">
206 <param name="choices" value="no"/>
207 </conditional>
208 <conditional name="set_denovo">
209 <param name="choices" value="yes"/>
210 </conditional>
211 <conditional name="set_cosmic">
212 <param name="choices" value="no"/>
213 </conditional>
214 <param name="nrun" value="10" />
215 <param name="rank" value="4" />
216 <param name="newsignum" value="4" />
217 <param name="rdata_out" value="true" />
218 <output name="denovo" file="denovo_output1.pdf" compare="sim_size"/>
219 <output name="sigmatrix" file="sigmatrix.tab" compare="sim_size"/>
220 <output name="rdata" file="denovo_1.RData" compare="sim_size" delta="400000"/> <!-- delta="170000" -->
221 </test>
222
223 <!-- cosmic signatures -->
224 <test>
225 <param name="vcfs">
226 <collection type="list">
227 <element name="6" value="F.vcf"/>
228 <element name="7" value="G.vcf"/>
229 <element name="8" value="H.vcf"/>
230 <element name="9" value="I.vcf"/>
231 </collection>
232 </param>
233 <param name="genome" value="BSgenome.Hsapiens.UCSC.hg38"/>
234 <param name="levels" value="FGHI_levels.tab" ftype="tabular"/>
235 <conditional name="set_spectrum">
236 <param name="choices" value="no"/>
237 </conditional>
238 <conditional name="set_denovo">
239 <param name="choices" value="no"/>
240 </conditional>
241 <conditional name="set_cosmic">
242 <param name="choices" value="yes"/>
243 <param name="contrib_matrix_out" value="true" />
244 </conditional>
245 <param name="signum" value="3" />
246 <output name="cosmic" file="cosmic_output1.pdf" compare="sim_size"/>
247 <output name="sig_contrib_matrix" file="sig_contrib_table.tsv" compare="sim_size"/>
248 </test>
249 <!-- cosmic signature on single sample -->
250 <test>
251 <param name="vcfs">
252 <collection type="list">
253 <element name="1" value="G.vcf"/>
254 </collection>
255 </param>
256 <param name="genome" value="BSgenome.Hsapiens.UCSC.hg38"/>
257 <conditional name="set_spectrum">
258 <param name="choices" value="no"/>
259 </conditional>
260 <conditional name="set_denovo">
261 <param name="choices" value="no"/>
262 </conditional>
263 <conditional name="set_cosmic">
264 <param name="choices" value="yes"/>
265 </conditional>
266 <param name="signum" value="5" />
267 <output name="cosmic" file="cosmic_output2.pdf" compare="sim_size" delta="50000"/>
268 </test>
269 </tests>
270 <help>
271
272 **What it does**
273
274 Takes as inputs
275
276 * a collection of n vcf files corresponding to n samples.
277 * a tabular table describing the correspondance of sample names to levels (tissues, ages, sexes, etc.)
278 * the number of cosmic signatures to decompose mutational patterns of samples
279
280
281 This tool returns a pdf file with the visualisation :
282
283 * the Cosine similarity of samples when decomposed over the 30 signatures of cosmic_
284 * the absolute contribution of the n most contributing cosmic_ signatures in the samples mutational patterns (to be set by the user, between 2 and 30)
285 * the relative contribution of the n most contributing cosmic_ signatures in the samples mutational patterns (to be set by the user, between 2 and 30)
286 * a clustering of the samples with respect to the relative contribution of their cosmic_ signatures
287 * pie charts of the samples displaying for each sample the relative contribution of the n most contributing cosmic_ signatures to their mutational pattern
288
289 .. _cosmic: https://cancer.sanger.ac.uk/cosmic/signatures_v2.tt
290
291 </help>
292 <citations>
293 <citation type="doi">10.18129/B9.bioc.MutationalPatterns</citation>
294 <citation type="doi">10.1186/s13073-018-0539-0</citation>
295 <citation type="doi">10.1038/nature12477</citation>
296 </citations>
297 </tool>