comparison small_rna_maps.xml @ 13:458a88317c22 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/small_rna_maps commit c2fde4ca142c58719749c04046270479485e8d4b
author artbio
date Tue, 10 Apr 2018 06:12:01 -0400
parents d33263e6e812
children cd75c72e1d75
comparison
equal deleted inserted replaced
12:d33263e6e812 13:458a88317c22
1 <tool id="small_rna_maps" name="small_rna_maps" version="2.5.0"> 1 <tool id="small_rna_maps" name="small_rna_maps" version="2.5.1">
2 <description></description> 2 <description></description>
3 <requirements> 3 <requirements>
4 <requirement type="package" version="1.11.2=py27_0">numpy</requirement> 4 <requirement type="package" version="1.11.2=py27_0">numpy</requirement>
5 <requirement type="package" version="0.11.2.1=py27_0">pysam</requirement> 5 <requirement type="package" version="0.11.2.1=py27_0">pysam</requirement>
6 <requirement type="package" version="1.3.2=r3.3.2_0">r-optparse</requirement> 6 <requirement type="package" version="1.3.2=r3.3.2_0">r-optparse</requirement>
11 </requirements> 11 </requirements>
12 <stdio> 12 <stdio>
13 <exit_code range="1:" level="fatal" description="Tool exception" /> 13 <exit_code range="1:" level="fatal" description="Tool exception" />
14 </stdio> 14 </stdio>
15 <command detect_errors="exit_code"><![CDATA[ 15 <command detect_errors="exit_code"><![CDATA[
16 #if $inputs_cond.normalize == "no": 16 #for $file in $series
17 #for $file in $inputs_cond.inputs
18 samtools index '$file';
19 #end for
20 python '$__tool_directory__'/small_rna_maps.py
21 --inputs
22 #for $file in $inputs_cond.inputs
23 '$file'
24 #end for
25 --sample_names
26 #for $sample in $inputs_cond.inputs
27 '$sample.name'
28 #end for
29 #else if $inputs_cond.normalize == "yes":
30 #for $file in $inputs_cond.series
31 samtools index '$file.inputs'; 17 samtools index '$file.inputs';
32 #end for 18 #end for
33 python '$__tool_directory__'/small_rna_maps.py 19 python '$__tool_directory__'/small_rna_maps.py
34 --inputs 20 --inputs
35 #for $file in $inputs_cond.series 21 #for $file in $series
36 '$file.inputs' 22 '$file.inputs'
37 #end for 23 #end for
38 --sample_names 24 --sample_names
39 #for $sample in $inputs_cond.series 25 #for $sample in $series
40 '$sample.inputs.name' 26 '$sample.inputs.name'
41 #end for 27 #end for
42 #end if
43 --minsize $minsize 28 --minsize $minsize
44 --maxsize $maxsize 29 --maxsize $maxsize
45 --cluster $cluster 30 --cluster $cluster
46 #if str($plots_options.plots_options_selector ) == "two_plot": 31 #if str($plots_options.plots_options_selector ) == "two_plot":
47 --plot_methods '${plots_options.first_plot}' '${plots_options.extra_plot}' 32 --plot_methods '${plots_options.first_plot}' '${plots_options.extra_plot}'
55 #end if 40 #end if
56 Rscript '$__tool_directory__'/small_rna_maps.r 41 Rscript '$__tool_directory__'/small_rna_maps.r
57 --first_dataframe '$output_tab' 42 --first_dataframe '$output_tab'
58 --extra_dataframe '$extra_output_tab' 43 --extra_dataframe '$extra_output_tab'
59 --normalization 44 --normalization
60 #if $inputs_cond.normalize == "no": 45 #set $norm = ""
61 '' 46 #for $file in $series
62 #else if $inputs_cond.normalize == "yes": 47 #set $norm += str($file.normalization)+' '
63 #set $norm = "" 48 #end for
64 #for $file in $inputs_cond.series 49 #set $norm = $norm[:-1]
65 #set $norm += str($file.normalization)+' ' 50 '$norm'
66 #end for
67 #set $norm = $norm[:-1]
68 '$norm'
69 #end if
70 #if $ylimits_cond.ylimits == "no": 51 #if $ylimits_cond.ylimits == "no":
71 --ymin '' --ymax '' 52 --ymin '' --ymax ''
72 #else: 53 #else:
73 --ymin '${ylimits_cond.ymin}' --ymax '${ylimits_cond.ymax}' 54 --ymin '${ylimits_cond.ymin}' --ymax '${ylimits_cond.ymax}'
74 #end if 55 #end if
84 --extra_plot_method '' 65 --extra_plot_method ''
85 #end if 66 #end if
86 --output_pdf '$output_pdf' 67 --output_pdf '$output_pdf'
87 ]]></command> 68 ]]></command>
88 <inputs> 69 <inputs>
89 <conditional name="inputs_cond"> 70 <repeat name="series" title="Input" min="1">
90 <param name="normalize" type="boolean" label="Will there be normalization?" truevalue="yes" falsevalue="no" checked="false"/> 71 <param name="inputs" type="data" format="bam" label="Select a single alignment file to parse" multiple="false"
91 <when value="no"> 72 help="If 'multiple datasets' method is used, the same normalization factor will be applied to each dataset. Please refer to the help section for more information." />
92 <param name="inputs" type="data" format="bam" label="Select multiple alignments to parse" multiple="True"/> 73 <param name="normalization" type="float" label="Enter a size/normalization factor."
93 </when> 74 help="Enter only one value e.g. '0.75' or '1.23'" value="1.0"/>
94 <when value="yes"> 75 </repeat>
95 <repeat name="series" title="Normalization factors" min="1">
96 <param name="inputs" type="data" format="bam" label="Select multiple alignments to parse" />
97 <param name="normalization" type="float" label="Enter size/normalization factors."
98 help="e.g. '0.75' '1.23'" value="1.0"/>
99 </repeat>
100 </when>
101 </conditional>
102 <param name="minsize" type="integer" label="Minimal size of reads for inclusion in analysis" 76 <param name="minsize" type="integer" label="Minimal size of reads for inclusion in analysis"
103 value="0" help="default value: 0" /> 77 value="0" help="default value: 0" />
104 <param name="maxsize" type="integer" label="Maximal size of reads for inclusion in analysis" 78 <param name="maxsize" type="integer" label="Maximal size of reads for inclusion in analysis"
105 value="10000" help="default value: 10000" /> 79 value="10000" help="default value: 10000" />
106 <param name="cluster" type="integer" label="Aggregation distance in nucleotides" 80 <param name="cluster" type="integer" label="Aggregation distance in nucleotides"
164 <data format="pdf" name="output_pdf" label="small RNA maps" /> 138 <data format="pdf" name="output_pdf" label="small RNA maps" />
165 </outputs> 139 </outputs>
166 140
167 <tests> 141 <tests>
168 <test> 142 <test>
169 <param name="inputs" value="input1.bam" ftype="bam"/> 143 <repeat name="series">
144 <param name="inputs" value="input1.bam" ftype="bam" />
145 <param name="normalization" value="1.0" />
146 </repeat>
170 <param name="minsize" value="0" /> 147 <param name="minsize" value="0" />
171 <param name="maxsize" value="10000" /> 148 <param name="maxsize" value="10000" />
172 <param name="cluster" value="0" /> 149 <param name="cluster" value="0" />
173 <param name="ylimits" value="yes" /> 150 <param name="ylimits" value="yes" />
174 <param name="ymin" value="-5" /> 151 <param name="ymin" value="-5" />
177 <param name="first_plot" value="Counts" /> 154 <param name="first_plot" value="Counts" />
178 <output file="input1_counts_yminneg5_5.tab" name="output_tab" /> 155 <output file="input1_counts_yminneg5_5.tab" name="output_tab" />
179 <output file="input1_yminneg5_5_single_plot_counts.pdf" name="output_pdf" /> 156 <output file="input1_yminneg5_5_single_plot_counts.pdf" name="output_pdf" />
180 </test> 157 </test>
181 <test> 158 <test>
182 <param name="inputs" value="input1.bam" ftype="bam"/> 159 <repeat name="series">
160 <param name="inputs" value="input1.bam" ftype="bam" />
161 <param name="normalization" value="1.0" />
162 </repeat>
183 <param name="minsize" value="0" /> 163 <param name="minsize" value="0" />
184 <param name="maxsize" value="10000" /> 164 <param name="maxsize" value="10000" />
185 <param name="cluster" value="5" /> 165 <param name="cluster" value="5" />
186 <param name="plots_options_selector" value="one_plot" /> 166 <param name="plots_options_selector" value="one_plot" />
187 <param name="first_plot" value="Coverage" /> 167 <param name="first_plot" value="Coverage" />
188 <output file="input1_coverage_cluster5.tab" name="output_tab" /> 168 <output file="input1_coverage_cluster5.tab" name="output_tab" />
189 <output file="input1_cluster5_single_plot_coverage.pdf" name="output_pdf" /> 169 <output file="input1_cluster5_single_plot_coverage.pdf" name="output_pdf" />
190 </test> 170 </test>
191 <test> 171 <test>
192 <param name="inputs" value="input1.bam" ftype="bam"/> 172 <repeat name="series">
173 <param name="inputs" value="input1.bam" ftype="bam" />
174 <param name="normalization" value="1.0" />
175 </repeat>
193 <param name="minsize" value="20" /> 176 <param name="minsize" value="20" />
194 <param name="maxsize" value="30" /> 177 <param name="maxsize" value="30" />
195 <param name="cluster" value="0" /> 178 <param name="cluster" value="0" />
196 <param name="plots_options_selector" value="one_plot" /> 179 <param name="plots_options_selector" value="one_plot" />
197 <param name="first_plot" value="Size" /> 180 <param name="first_plot" value="Size" />
198 <output file="input1_min20_max30_size.tab" name="output_tab" /> 181 <output file="input1_min20_max30_size.tab" name="output_tab" />
199 <output file="input1_min20_max30_single_plot_size.pdf" name="output_pdf" /> 182 <output file="input1_min20_max30_single_plot_size.pdf" name="output_pdf" />
200 </test> 183 </test>
201 <test> 184 <test>
202 <param name="inputs" value="input1.bam" ftype="bam"/> 185 <repeat name="series">
186 <param name="inputs" value="input1.bam" ftype="bam" />
187 <param name="normalization" value="1.0" />
188 </repeat>
203 <param name="minsize" value="0" /> 189 <param name="minsize" value="0" />
204 <param name="maxsize" value="10000" /> 190 <param name="maxsize" value="10000" />
205 <param name="cluster" value="0" /> 191 <param name="cluster" value="0" />
206 <param name="plots_options_selector" value="one_plot" /> 192 <param name="plots_options_selector" value="one_plot" />
207 <param name="first_plot" value="Mean" /> 193 <param name="first_plot" value="Mean" />
208 <output file="input1_mean.tab" name="output_tab" /> 194 <output file="input1_mean.tab" name="output_tab" />
209 <output file="input1__single_plot_mean.pdf" name="output_pdf" /> 195 <output file="input1__single_plot_mean.pdf" name="output_pdf" />
210 </test> 196 </test>
211 <test> 197 <test>
212 <param name="inputs" value="input1.bam" ftype="bam"/> 198 <repeat name="series">
199 <param name="inputs" value="input1.bam" ftype="bam" />
200 <param name="normalization" value="1.0" />
201 </repeat>
213 <param name="minsize" value="0" /> 202 <param name="minsize" value="0" />
214 <param name="maxsize" value="10000" /> 203 <param name="maxsize" value="10000" />
215 <param name="cluster" value="0" /> 204 <param name="cluster" value="0" />
216 <param name="plots_options_selector" value="one_plot" /> 205 <param name="plots_options_selector" value="one_plot" />
217 <param name="first_plot" value="Median" /> 206 <param name="first_plot" value="Median" />
218 <output file="input1_median.tab" name="output_tab" /> 207 <output file="input1_median.tab" name="output_tab" />
219 <output file="input1_single_plot_median.pdf" name="output_pdf" /> 208 <output file="input1_single_plot_median.pdf" name="output_pdf" />
220 </test> 209 </test>
221 <test> 210 <test>
222 <param name="normalize" value="yes" />
223 <repeat name="series"> 211 <repeat name="series">
224 <param name="inputs" value="input1.bam" ftype="bam" /> 212 <param name="inputs" value="input1.bam" ftype="bam" />
225 <param name="normalization" value="1.0" /> 213 <param name="normalization" value="1.0" />
226 </repeat> 214 </repeat>
227 <repeat name="series"> 215 <repeat name="series">
235 <param name="first_plot" value="Counts" /> 223 <param name="first_plot" value="Counts" />
236 <output file="input1_input2_norm_1_2_counts.tab" name="output_tab" /> 224 <output file="input1_input2_norm_1_2_counts.tab" name="output_tab" />
237 <output file="input1_input2_norm_1_2_single_plot_counts.pdf" name="output_pdf" /> 225 <output file="input1_input2_norm_1_2_single_plot_counts.pdf" name="output_pdf" />
238 </test> 226 </test>
239 <test> 227 <test>
240 <param name="inputs" value="input1.bam,input2.bam" ftype="bam"/> 228 <repeat name="series">
229 <param name="inputs" value="input1.bam" ftype="bam" />
230 <param name="normalization" value="1.0" />
231 </repeat>
232 <repeat name="series">
233 <param name="inputs" value="input2.bam" ftype="bam" />
234 <param name="normalization" value="1.0" />
235 </repeat>
241 <param name="minsize" value="0" /> 236 <param name="minsize" value="0" />
242 <param name="maxsize" value="10000" /> 237 <param name="maxsize" value="10000" />
243 <param name="cluster" value="0" /> 238 <param name="cluster" value="0" />
244 <param name="ylimits" value="yes" /> 239 <param name="ylimits" value="yes" />
245 <param name="ymin" value="-5" /> 240 <param name="ymin" value="-5" />
250 <output file="input1_input2_counts.tab" name="output_tab" /> 245 <output file="input1_input2_counts.tab" name="output_tab" />
251 <output file="input1_input2_size.tab" name="extra_output_tab" /> 246 <output file="input1_input2_size.tab" name="extra_output_tab" />
252 <output file="input1_input2_double_plot_counts_size_ylimneg5_5.pdf" name="output_pdf" /> 247 <output file="input1_input2_double_plot_counts_size_ylimneg5_5.pdf" name="output_pdf" />
253 </test> 248 </test>
254 <test> 249 <test>
255 <param name="inputs" value="input_single_chr.bam,input_single_chr.bam,input_single_chr.bam,input_single_chr.bam,input_single_chr.bam,input_single_chr.bam" ftype="bam"/> 250 <repeat name="series">
251 <param name="inputs" value="input_single_chr.bam" ftype="bam" />
252 <param name="normalization" value="1.0" />
253 </repeat>
254 <repeat name="series">
255 <param name="inputs" value="input_single_chr.bam" ftype="bam" />
256 <param name="normalization" value="1.0" />
257 </repeat>
258 <repeat name="series">
259 <param name="inputs" value="input_single_chr.bam" ftype="bam" />
260 <param name="normalization" value="1.0" />
261 </repeat>
262 <repeat name="series">
263 <param name="inputs" value="input_single_chr.bam" ftype="bam" />
264 <param name="normalization" value="1.0" />
265 </repeat>
266 <repeat name="series">
267 <param name="inputs" value="input_single_chr.bam" ftype="bam" />
268 <param name="normalization" value="1.0" />
269 </repeat>
270 <repeat name="series">
271 <param name="inputs" value="input_single_chr.bam" ftype="bam" />
272 <param name="normalization" value="1.0" />
273 </repeat>
256 <param name="minsize" value="0" /> 274 <param name="minsize" value="0" />
257 <param name="maxsize" value="10000" /> 275 <param name="maxsize" value="10000" />
258 <param name="cluster" value="0" /> 276 <param name="cluster" value="0" />
259 <param name="plots_options_selector" value="one_plot" /> 277 <param name="plots_options_selector" value="one_plot" />
260 <param name="first_plot" value="Coverage" /> 278 <param name="first_plot" value="Coverage" />
261 <output file="input_single_chr_x_6_single_plot_coverage.tab" name="output_tab" /> 279 <output file="input_single_chr_x_6_single_plot_coverage.tab" name="output_tab" />
262 <output file="input_single_chr_x_6_single_plot_coverage.pdf" name="output_pdf" /> 280 <output file="input_single_chr_x_6_single_plot_coverage.pdf" name="output_pdf" />
263 </test> 281 </test>
264 <test> 282 <test>
265 <param name="inputs" value="input1.bam,input2.bam" ftype="bam"/> 283 <repeat name="series">
284 <param name="inputs" value="input1.bam" ftype="bam" />
285 <param name="normalization" value="1.0" />
286 </repeat>
287 <repeat name="series">
288 <param name="inputs" value="input2.bam" ftype="bam" />
289 <param name="normalization" value="1.0" />
290 </repeat>
266 <param name="minsize" value="0" /> 291 <param name="minsize" value="0" />
267 <param name="maxsize" value="10000" /> 292 <param name="maxsize" value="10000" />
268 <param name="cluster" value="0" /> 293 <param name="cluster" value="0" />
269 <param name="plots_options_selector" value="global" /> 294 <param name="plots_options_selector" value="global" />
270 <param name="mergestrands" value="nomerge" /> 295 <param name="mergestrands" value="nomerge" />
271 <param name="first_plot" value="Size" /> 296 <param name="first_plot" value="Size" />
272 <param name="normalization" value="1 1" />
273 <output file="size.tab" name="output_tab" /> 297 <output file="size.tab" name="output_tab" />
274 <output file="global_nomerge.pdf" name="output_pdf" /> 298 <output file="global_nomerge.pdf" name="output_pdf" />
275 </test> 299 </test>
276 <test> 300 <test>
277 <param name="inputs" value="input1.bam,input2.bam" ftype="bam"/> 301 <repeat name="series">
302 <param name="inputs" value="input1.bam" ftype="bam" />
303 <param name="normalization" value="1.0" />
304 </repeat>
305 <repeat name="series">
306 <param name="inputs" value="input2.bam" ftype="bam" />
307 <param name="normalization" value="1.0" />
308 </repeat>
278 <param name="minsize" value="0" /> 309 <param name="minsize" value="0" />
279 <param name="maxsize" value="10000" /> 310 <param name="maxsize" value="10000" />
280 <param name="cluster" value="0" /> 311 <param name="cluster" value="0" />
281 <param name="plots_options_selector" value="global" /> 312 <param name="plots_options_selector" value="global" />
282 <param name="mergestrands" value="merge" /> 313 <param name="mergestrands" value="merge" />
283 <param name="first_plot" value="Size" /> 314 <param name="first_plot" value="Size" />
284 <param name="normalization" value="1 1" />
285 <output file="size.tab" name="output_tab" /> 315 <output file="size.tab" name="output_tab" />
286 <output file="global_merge.pdf" name="output_pdf" /> 316 <output file="global_merge.pdf" name="output_pdf" />
287 </test> 317 </test>
288 </tests> 318 </tests>
289 <help> 319 <help>
318 bam alignment files that must be 348 bam alignment files that must be
319 349
320 - single-read 350 - single-read
321 - sorted 351 - sorted
322 - mapped to the same reference 352 - mapped to the same reference
353
354 To plot 2 alignment files in the same PDF output the 'single dataset' method should be used.
355
356 .. class:: warningmark
357
358 If the 'multiple dataset' method is used the normalization factor will be applied to every file selected in the input list.
359 Additionally each file in the selected list will be plotted in a separate PDF file.
323 360
324 **Output** 361 **Output**
325 362
326 A pdf file generated by the R package lattice and one or two dataframes used to plot the data. 363 A pdf file generated by the R package lattice and one or two dataframes used to plot the data.
327 364