Mercurial > repos > iuc > maaslin2
comparison maaslin2.xml @ 2:faacef62bb54 draft
planemo upload for repository https://github.com/biobakery/Maaslin2 commit c6827285ea113de141b6f4111cffe872b6e2cef3
author | iuc |
---|---|
date | Mon, 29 Apr 2024 10:33:48 +0000 |
parents | ef2cace85809 |
children | 43ccbef89f1d |
comparison
equal
deleted
inserted
replaced
1:ef2cace85809 | 2:faacef62bb54 |
---|---|
5 </macros> | 5 </macros> |
6 <expand macro="edam_ontology"/> | 6 <expand macro="edam_ontology"/> |
7 <expand macro="xrefs"/> | 7 <expand macro="xrefs"/> |
8 <expand macro="requirements"/> | 8 <expand macro="requirements"/> |
9 <command detect_errors="exit_code"><![CDATA[ | 9 <command detect_errors="exit_code"><![CDATA[ |
10 | |
11 ## get column names of fixed and random effect from the input file, since galaxy | |
12 ## can only return indices with type="data_column" | |
13 ## using awk so that the file is only parsed on command line execution | |
14 | |
15 #if $fixed_effects | |
16 #set idx = [] | |
17 #for $i in $fixed_effects: | |
18 #silent idx.append(f'${i}') | |
19 #end for | |
20 #set idx_for_awk = ','.join(idx) | |
21 | |
22 fixed_effects=`awk -v OFS=',' -F"\t" 'NR == 1 { print $idx_for_awk}' '$input_metadata'` && | |
23 echo 'Assigned fixed effects as:' \$fixed_effects && | |
24 #end if | |
25 | |
26 | |
27 #if $random_effects | |
28 #set idx = [] | |
29 #for $i in $random_effects: | |
30 #silent idx.append(f'${i}') | |
31 #end for | |
32 #set idx_for_awk = ','.join(idx) | |
33 | |
34 random_effects=`awk -v OFS=',' -F"\t" 'NR == 1 { print $idx_for_awk}' '$input_metadata'` && | |
35 echo 'Assigned random effects as:' \$random_effects && | |
36 #end if | |
37 | |
10 ln -s '$input_data' 'input_data.tsv' | 38 ln -s '$input_data' 'input_data.tsv' |
11 && | 39 && |
12 ln -s '$input_metadata' 'input_metadata.tsv' | 40 ln -s '$input_metadata' 'input_metadata.tsv' |
13 && | 41 && |
14 Maaslin2.R | 42 Maaslin2.R |
29 #end if | 57 #end if |
30 #if $additional_options.analysis_method | 58 #if $additional_options.analysis_method |
31 --analysis_method '$additional_options.analysis_method' | 59 --analysis_method '$additional_options.analysis_method' |
32 #end if | 60 #end if |
33 #if $random_effects | 61 #if $random_effects |
34 --random_effects '$random_effects' | 62 --random_effects \$random_effects |
35 #end if | 63 #end if |
36 #if $fixed_effects | 64 #if $fixed_effects |
37 --fixed_effects '$fixed_effects' | 65 --fixed_effects \$fixed_effects |
38 #end if | 66 #end if |
39 #if $additional_options.correction | 67 #if $additional_options.correction |
40 --correction '$additional_options.correction' | 68 --correction '$additional_options.correction' |
41 #end if | 69 #end if |
42 $additional_options.standardize | 70 $additional_options.standardize |
49 'input_data.tsv' | 77 'input_data.tsv' |
50 'input_metadata.tsv' | 78 'input_metadata.tsv' |
51 'outputFolder' | 79 'outputFolder' |
52 && | 80 && |
53 cd outputFolder && mkdir -p figures/ && cp *.pdf figures | 81 cd outputFolder && mkdir -p figures/ && cp *.pdf figures |
82 | |
54 ]]></command> | 83 ]]></command> |
55 <inputs> | 84 <inputs> |
56 <param name="input_data" type="data" format="tabular" label="Data (or features) file"/> | 85 <param name="input_data" type="data" format="tabular" label="Data (or features) file"/> |
57 <param name="input_metadata" type="data" format="tabular" label="Metadata file"/> | 86 <param name="input_metadata" type="data" format="tabular" label="Metadata file"/> |
58 <param argument="--fixed_effects" type="select" multiple="true" optional="true" label="Interactions: Fixed effects" help="The fixed effects for the model, comma-delimited for multiple effects"> | 87 <param argument="--fixed_effects" type="data_column" data_ref="input_metadata" use_header_names="true" multiple="true" optional="true" label="Interactions: Fixed effects" help="The fixed effects for the model, comma-delimited for multiple effects, Default value: All " /> |
59 <option value="diagnosis" selected="true">diagnosis</option> | 88 |
60 <option value="dysbiosisnonIBD" selected="true">dysbiosisnonIBD</option> | 89 <param argument="--random_effects" type="data_column" data_ref="input_metadata" use_header_names="true" multiple="true" optional="true" label="Random effects" help="The random effects for the model, comma-delimited for multiple effects, Default: None" /> |
61 <option value="dysbiosisUC" selected="true">dysbiosisUC</option> | 90 |
62 <option value="dysbiosisCD" selected="true">dysbiosisCD</option> | 91 |
63 <option value="antibiotics" selected="true">antibiotics</option> | 92 |
64 <option value="age" selected="true">age</option> | |
65 </param> | |
66 <param argument="--random_effects" type="text" multiple="true" optional="true" label="Random effects" help="The random effects for the model, comma-delimited for multiple effects"/> | |
67 <section name="additional_options" title="Additional Options" expanded="true"> | 93 <section name="additional_options" title="Additional Options" expanded="true"> |
68 <param argument="--min_abundance" type="float" value="0.0" optional="true" label="Minimum abundance" help="The minimum abundance for each feature"/> | 94 <param argument="--min_abundance" type="float" value="0.0" optional="true" label="Minimum abundance" help="The minimum abundance for each feature"/> |
69 <param argument="--min_prevalence" type="float" value="0.1" optional="true" label="Minimum prevalence" help="The minimum percent of samples for which a feature is detected at minimum abundance"/> | 95 <param argument="--min_prevalence" type="float" value="0.1" optional="true" label="Minimum prevalence" help="The minimum percent of samples for which a feature is detected at minimum abundance"/> |
70 <param argument="--max_significance" type="float" value="0.25" optional="true" label="Maximum significance" help="The q-value threshold for significance"/> | 96 <param argument="--max_significance" type="float" value="0.25" optional="true" label="Maximum significance" help="The q-value threshold for significance"/> |
71 <param argument="--normalization" type="select" optional="true" label="The normalization method to apply"> | 97 <param argument="--normalization" type="select" optional="true" label="The normalization method to apply"> |
85 <option value="LM" selected="true">LM</option> | 111 <option value="LM" selected="true">LM</option> |
86 <option value="CPLM">CPLM</option> | 112 <option value="CPLM">CPLM</option> |
87 <option value="NEGBIN">NEGBIN</option> | 113 <option value="NEGBIN">NEGBIN</option> |
88 <option value="ZINB">ZINB</option> | 114 <option value="ZINB">ZINB</option> |
89 </param> | 115 </param> |
90 <param argument="--correction" type="text" value="BH" optional="true" label="Correction" help="The correction method for computing the q-value"/> | 116 <param argument="--correction" type="select" value="BH" optional="true" label="Correction" help="The correction method for computing the q-value, Default: BH "> |
117 | |
118 <option value="BH">Benjamini-Hochberg(BH)</option> | |
119 <option value="BY">Benjamini-Yekutieli(BY)</option> | |
120 </param> | |
91 <param argument="--standardize" type="boolean" truevalue="--standardize TRUE" falsevalue="--standardize FALSE" checked="true" label="Apply z-score so continuous metadata are on the same scale"/> | 121 <param argument="--standardize" type="boolean" truevalue="--standardize TRUE" falsevalue="--standardize FALSE" checked="true" label="Apply z-score so continuous metadata are on the same scale"/> |
92 </section> | 122 </section> |
93 <section name="output" title="Set Plotting Output" expanded="true"> | 123 <section name="output" title="Set Plotting Output" expanded="true"> |
94 <param argument="--plot_heatmap" type="boolean" truevalue="--plot_heatmap TRUE" falsevalue="--plot_heatmap FALSE" checked="true" label="Generate a heatmap for the significant associations"/> | 124 <param argument="--plot_heatmap" type="boolean" truevalue="--plot_heatmap TRUE" falsevalue="--plot_heatmap FALSE" checked="true" label="Generate a heatmap for the significant associations"/> |
95 <param argument="--heatmap_first_n" type="integer" value="50" optional="true" label="Heatmap plot first N" help="In heatmap, plot top N features with significant associations"/> | 125 <param argument="--heatmap_first_n" type="integer" value="50" optional="true" label="Heatmap plot first N" help="In heatmap, plot top N features with significant associations"/> |
113 </outputs> | 143 </outputs> |
114 <tests> | 144 <tests> |
115 <test expect_num_outputs="5"> | 145 <test expect_num_outputs="5"> |
116 <param name="input_data" value="HMP2_taxonomy.tsv"/> | 146 <param name="input_data" value="HMP2_taxonomy.tsv"/> |
117 <param name="input_metadata" value="HMP2_metadata.tsv"/> | 147 <param name="input_metadata" value="HMP2_metadata.tsv"/> |
118 <param name="random_effects" value="site,subject"/> | 148 <param name="random_effects" value= "2,5"/> |
119 <param name="fixed_effects" value="diagnosis,dysbiosisnonIBD,dysbiosisUC,dysbiosisCD,antibiotics,age"/> | 149 <param name="fixed_effects" value="4,9,10,11,6,3"/> |
120 <section name="additional_options"> | 150 <section name="additional_options"> |
121 <param name="min_abundance" value="0.0"/> | 151 <param name="min_abundance" value="0.0"/> |
122 <param name="min_prevalence" value="0.1"/> | 152 <param name="min_prevalence" value="0.1"/> |
123 <param name="max_significance" value="0.25"/> | 153 <param name="max_significance" value="0.25"/> |
124 <param name="normalization" value="NONE"/> | 154 <param name="normalization" value="NONE"/> |
196 </output_collection> | 226 </output_collection> |
197 </test> | 227 </test> |
198 <test expect_num_outputs="5"> | 228 <test expect_num_outputs="5"> |
199 <param name="input_data" value="HMP2_taxonomy.tsv"/> | 229 <param name="input_data" value="HMP2_taxonomy.tsv"/> |
200 <param name="input_metadata" value="HMP2_metadata.tsv"/> | 230 <param name="input_metadata" value="HMP2_metadata.tsv"/> |
201 <param name="fixed_effects" value="diagnosis,dysbiosisnonIBD"/> | 231 <param name="fixed_effects" value="4,9"/> |
202 <section name="additional_options"> | 232 <section name="additional_options"> |
203 <param name="min_abundance" value="0.0"/> | 233 <param name="min_abundance" value="0.0"/> |
204 <param name="min_prevalence" value="0.1"/> | 234 <param name="min_prevalence" value="0.1"/> |
205 <param name="max_significance" value="0.25"/> | 235 <param name="max_significance" value="0.25"/> |
206 <param name="normalization" value="NONE"/> | 236 <param name="normalization" value="NONE"/> |
243 </output_collection> | 273 </output_collection> |
244 </test> | 274 </test> |
245 <test expect_num_outputs="5"> | 275 <test expect_num_outputs="5"> |
246 <param name="input_data" value="HMP2_taxonomy.tsv"/> | 276 <param name="input_data" value="HMP2_taxonomy.tsv"/> |
247 <param name="input_metadata" value="HMP2_metadata.tsv"/> | 277 <param name="input_metadata" value="HMP2_metadata.tsv"/> |
248 <param name="fixed_effects" value="diagnosis,dysbiosisnonIBD"/> | 278 <param name="fixed_effects" value="4,9"/> |
249 <section name="additional_options"> | 279 <section name="additional_options"> |
250 <param name="min_abundance" value="0.0001"/> | 280 <param name="min_abundance" value="0.0001"/> |
251 <param name="min_prevalence" value="0.1"/> | 281 <param name="min_prevalence" value="0.1"/> |
252 <param name="max_significance" value="0.25"/> | 282 <param name="max_significance" value="0.25"/> |
253 <param name="normalization" value="NONE"/> | 283 <param name="normalization" value="NONE"/> |
302 <has_size value="2599373" delta="1000000" /> | 332 <has_size value="2599373" delta="1000000" /> |
303 </assert_contents> | 333 </assert_contents> |
304 </element> | 334 </element> |
305 </output_collection> | 335 </output_collection> |
306 </test> | 336 </test> |
337 <test expect_num_outputs="5"> | |
338 <param name="input_data" value="HMP2_taxonomy.tsv"/> | |
339 <param name="input_metadata" value="HMP2_metadata.tsv"/> | |
340 <param name="random_effects" value="3" /> | |
341 <section name="additional_options"> | |
342 <param name="min_abundance" value="0.0"/> | |
343 <param name="min_prevalence" value="0.1"/> | |
344 <param name="max_significance" value="0.25"/> | |
345 <param name="normalization" value="TSS"/> | |
346 <param name="transform" value="LOG"/> | |
347 <param name="analysis_method" value="LM"/> | |
348 <param name="correction" value="BY"/> | |
349 <param name="standardize" value="True"/> | |
350 </section> | |
351 <section name="output"> | |
352 <param name="plot_heatmap" value="true"/> | |
353 <param name="heatmap_first_n" value="50"/> | |
354 <param name="plot_scatter" value="true"/> | |
355 <param name="residuals_output" value="true"/> | |
356 </section> | |
357 <output name="all_results"> | |
358 <assert_contents> | |
359 <has_text text="feature"/> | |
360 <has_n_lines n="8092"/> | |
361 <has_n_columns n="9"/> | |
362 </assert_contents> | |
363 </output> | |
364 <output name="significant_results"> | |
365 <assert_contents> | |
366 <has_text text="subject"/> | |
367 <has_n_lines n="216" delta="5"/> | |
368 <has_n_columns n="9"/> | |
369 </assert_contents> | |
370 </output> | |
371 <output name="residuals"> | |
372 <assert_contents> | |
373 <has_size value="671142" delta="1000"/> | |
374 </assert_contents> | |
375 </output> | |
376 <output_collection name="figures_pdfs" type="list"> | |
377 <element name="heatmap.pdf" ftype="pdf"> | |
378 <assert_contents> | |
379 <has_size value="7000" delta="1000" /> | |
380 </assert_contents> | |
381 </element> | |
382 </output_collection> | |
383 </test> | |
384 <test expect_num_outputs="5"> | |
385 <param name="input_data" value="HMP2_taxonomy.tsv"/> | |
386 <param name="input_metadata" value="HMP2_metadata.tsv"/> | |
387 | |
388 <section name="additional_options"> | |
389 <param name="min_abundance" value="0.0"/> | |
390 <param name="min_prevalence" value="0.1"/> | |
391 <param name="max_significance" value="0.25"/> | |
392 <param name="normalization" value="TSS"/> | |
393 <param name="transform" value="LOG"/> | |
394 <param name="analysis_method" value="LM"/> | |
395 <param name="correction" value="BH"/> | |
396 <param name="standardize" value="True"/> | |
397 </section> | |
398 <section name="output"> | |
399 <param name="plot_heatmap" value="true"/> | |
400 <param name="heatmap_first_n" value="50"/> | |
401 <param name="plot_scatter" value="true"/> | |
402 <param name="residuals_output" value="true"/> | |
403 </section> | |
404 <output name="all_results"> | |
405 <assert_contents> | |
406 <has_text text="feature"/> | |
407 <has_n_lines n="8092"/> | |
408 <has_n_columns n="9"/> | |
409 </assert_contents> | |
410 </output> | |
411 <output name="significant_results"> | |
412 <assert_contents> | |
413 <has_text text="subject"/> | |
414 <has_n_lines n="880"/> | |
415 <has_n_columns n="9"/> | |
416 </assert_contents> | |
417 </output> | |
418 <output name="residuals"> | |
419 <assert_contents> | |
420 <has_size value="670759" delta="1000"/> | |
421 </assert_contents> | |
422 </output> | |
423 <output_collection name="figures_pdfs" type="list"> | |
424 <element name="heatmap.pdf" ftype="pdf"> | |
425 <assert_contents> | |
426 <has_size value="7900" delta="1000" /> | |
427 </assert_contents> | |
428 </element> | |
429 </output_collection> | |
430 </test> | |
307 </tests> | 431 </tests> |
308 <help><![CDATA[ | 432 <help><![CDATA[ |
309 @HELP_HEADER@ | 433 @HELP_HEADER@ |
310 MaAsLin 2 | 434 MaAsLin 2 |
311 ========= | 435 ========= |
345 - Q-values smaller than or equal to the threshold (tabular file) | 469 - Q-values smaller than or equal to the threshold (tabular file) |
346 - This file is a subset of the results in the first file. | 470 - This file is a subset of the results in the first file. |
347 - It only includes associations with q-values <= to the threshold. | 471 - It only includes associations with q-values <= to the threshold. |
348 - Data frame with residuals for each feature (R data file) | 472 - Data frame with residuals for each feature (R data file) |
349 - This file contains a data frame with residuals for each feature. | 473 - This file contains a data frame with residuals for each feature. |
474 | |
475 Correction methods to compute the q-value : https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/p.adjust | |
476 | |
350 2- Visualization output files | 477 2- Visualization output files |
351 - Heatmap of the significant associations (PDF file) | 478 - Heatmap of the significant associations (PDF file) |
352 - This file contains a heatmap of the significant associations. | 479 - This file contains a heatmap of the significant associations. |
353 - A plot for every significant association found (PDF file(s)) | 480 - A plot for every significant association found (PDF file(s)) |
354 - A plot is generated for each significant association. | 481 - A plot is generated for each significant association. |