|
1 | | -<tool id="humann" name="HUMAnN" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
| 1 | +<tool id="humann" name="HUMAnN" version="@TOOL_VERSION@+galaxy1" profile="@PROFILE@"> |
2 | 2 | <description>to profile presence/absence and abundance of microbial pathways and gene families</description> |
3 | 3 | <macros> |
4 | 4 | <import>macros.xml</import> |
|
170 | 170 | <expand macro="version"/> |
171 | 171 | <command detect_errors="exit_code"><![CDATA[ |
172 | 172 | #import re |
173 | | -#if $in.input.ext.startswith("fasta") |
| 173 | +#if $input_conditional.input.ext.startswith("fasta") |
174 | 174 | #set ext="fasta" |
175 | | -#else if $in.input.ext.startswith("fastq") |
| 175 | +#else if $input_conditional.input.ext.startswith("fastq") |
176 | 176 | #set ext="fastq" |
177 | | -#else if $in.input.ext.endswith("bam") |
| 177 | +#else if $input_conditional.input.ext.endswith("bam") |
178 | 178 | #set ext="bam" |
179 | | -#else if $in.input.ext == 'sam' |
| 179 | +#else if $input_conditional.input.ext == 'sam' |
180 | 180 | #set ext="sam" |
181 | | -#else if $in.input.ext == 'biom1' |
| 181 | +#else if $input_conditional.input.ext == 'biom1' |
182 | 182 | #set ext="biom" |
| 183 | +#else if $input_conditional.input.ext == 'tabular' |
| 184 | + #set ext="genetable" |
| 185 | +#else if $input_conditional.input.ext == 'tsv' |
| 186 | + #set ext="genetable" |
183 | 187 | #else |
184 | | - >&2 "unknown extension $in.input.ext" |
| 188 | + >&2 "unknown extension $input_conditional.input.ext" |
185 | 189 | exit 1; |
186 | 190 | #end if |
187 | | -#if $in.input.ext.endswith(".gz") |
| 191 | +#if $input_conditional.input.ext.endswith(".gz") |
188 | 192 | #set ext+=".gz" |
189 | 193 | #end if |
190 | 194 |
|
|
209 | 213 | #end if |
210 | 214 |
|
211 | 215 | humann |
212 | | - --input '$input' |
| 216 | + --input '$input_conditional.input' |
213 | 217 | --input-format $ext |
214 | 218 | -o 'output' |
215 | 219 | #if $wf.selector == 'bypass_prescreen' |
@@ -255,7 +259,7 @@ humann |
255 | 259 | --memory-use minimum |
256 | 260 | ]]></command> |
257 | 261 | <inputs> |
258 | | - <conditional name="in"> |
| 262 | + <conditional name="input_conditional"> |
259 | 263 | <param name="selector" type="select" label="Input(s)"> |
260 | 264 | <option value="raw" selected="true">Quality-controlled shotgun sequencing reads (metagenome (DNA reads) or metatranscriptome (RNA reads))</option> |
261 | 265 | <option value="mapping">Pre-computed mappings of reads to database sequences</option> |
@@ -350,10 +354,10 @@ humann |
350 | 354 | </inputs> |
351 | 355 | <outputs> |
352 | 356 | <data name="gene_families_tsv" format="tabular" from_work_dir="output/*_genefamilies.tsv" label="${tool.name} on ${on_string}: Gene families and their abundance" > |
353 | | - <filter>out['output_format'] == "tsv"</filter> |
| 357 | + <filter>input_conditional['selector'] != "abundance" and out['output_format'] == "tsv"</filter> |
354 | 358 | </data> |
355 | 359 | <data name="gene_families_biom" format="biom1" from_work_dir="output/*_genefamilies.biom" label="${tool.name} on ${on_string}: Gene families and their abundance as biom"> |
356 | | - <filter>out['output_format'] == "biom"</filter> |
| 360 | + <filter>input_conditional['selector'] != "abundance" and out['output_format'] == "biom"</filter> |
357 | 361 | </data> |
358 | 362 | <data name="pathcoverage_tsv" format="tabular" from_work_dir="output/*_pathcoverage.tsv" label="${tool.name} on ${on_string}: Pathways and their coverage" > |
359 | 363 | <filter>out['output_format'] == "tsv"</filter> |
@@ -396,7 +400,7 @@ humann |
396 | 400 | <tests> |
397 | 401 | <!-- This test refers to the Metaphlan v3 DB format, and hence should fail, which is to be caught gracefully. --> |
398 | 402 | <test expect_exit_code="42" expect_failure="true"> |
399 | | - <conditional name="in"> |
| 403 | + <conditional name="input_conditional"> |
400 | 404 | <!-- raw fasta file --> |
401 | 405 | <param name="selector" value="raw"/> |
402 | 406 | <param name="input" value="demo.fastq.gz"/> |
@@ -427,7 +431,7 @@ humann |
427 | 431 | </test> |
428 | 432 | <!-- This test refers to the Metaphlan v4 DB format, and hence should be a straight pass. --> |
429 | 433 | <test expect_num_outputs="12"> |
430 | | - <conditional name="in"> |
| 434 | + <conditional name="input_conditional"> |
431 | 435 | <!-- raw fasta file --> |
432 | 436 | <param name="selector" value="raw"/> |
433 | 437 | <param name="input" value="demo.fastq.gz"/> |
@@ -580,7 +584,7 @@ humann |
580 | 584 | </output> |
581 | 585 | </test> |
582 | 586 | <test expect_num_outputs="4"> |
583 | | - <conditional name="in"> |
| 587 | + <conditional name="input_conditional"> |
584 | 588 | <!-- fastq file --> |
585 | 589 | <param name="selector" value="raw"/> |
586 | 590 | <param name="input" value="demo.fasta.gz"/> |
@@ -660,7 +664,7 @@ humann |
660 | 664 | </output> |
661 | 665 | </test> |
662 | 666 | <test expect_num_outputs="4"> |
663 | | - <conditional name="in"> |
| 667 | + <conditional name="input_conditional"> |
664 | 668 | <param name="selector" value="raw"/> |
665 | 669 | <param name="input" value="demo.fasta.gz"/> |
666 | 670 | </conditional> |
@@ -742,7 +746,7 @@ humann |
742 | 746 | </output> |
743 | 747 | </test> |
744 | 748 | <test expect_num_outputs="4"> |
745 | | - <conditional name="in"> |
| 749 | + <conditional name="input_conditional"> |
746 | 750 | <!-- mapping SAM file --> |
747 | 751 | <param name="selector" value="mapping"/> |
748 | 752 | <param name="input" value="demo.sam"/> |
@@ -814,8 +818,40 @@ humann |
814 | 818 | </assert_contents> |
815 | 819 | </output> |
816 | 820 | </test> |
| 821 | + <!-- Test abundance input table --> |
| 822 | + <test expect_num_outputs="3"> |
| 823 | + <conditional name="input_conditional"> |
| 824 | + <param name="selector" value="abundance"/> |
| 825 | + <param name="input" value="demo_genefamilies.tsv"/> |
| 826 | + </conditional> |
| 827 | + <output name="pathcoverage_tsv" ftype="tabular"> |
| 828 | + <assert_contents> |
| 829 | + <has_text text="UNMAPPED"/> |
| 830 | + <has_text text="UNINTEGRATED"/> |
| 831 | + <has_text text="PWY-5423"/> |
| 832 | + <has_n_columns n="2"/> |
| 833 | + <has_n_lines n="8"/> |
| 834 | + </assert_contents> |
| 835 | + </output> |
| 836 | + <output name="pathabundance_tsv" ftype="tabular"> |
| 837 | + <assert_contents> |
| 838 | + <has_text text="UNMAPPED"/> |
| 839 | + <has_text text="UNINTEGRATED"/> |
| 840 | + <has_text text="PWY-5423"/> |
| 841 | + <has_n_columns n="2"/> |
| 842 | + <has_n_lines n="8"/> |
| 843 | + </assert_contents> |
| 844 | + </output> |
| 845 | + <output name="log" ftype="txt"> |
| 846 | + <assert_contents> |
| 847 | + <has_text text="processing gene table"/> |
| 848 | + <has_text text="g__Bacteroides.s__Bacteroides_vulgatus"/> |
| 849 | + <has_text text="computing pathways"/> |
| 850 | + </assert_contents> |
| 851 | + </output> |
| 852 | + </test> |
817 | 853 | <test expect_num_outputs="4"> |
818 | | - <conditional name="in"> |
| 854 | + <conditional name="input_conditional"> |
819 | 855 | <!-- raw fasta file --> |
820 | 856 | <param name="selector" value="raw"/> |
821 | 857 | <param name="input" value="demo.fastq.gz"/> |
@@ -880,7 +916,7 @@ humann |
880 | 916 | </output> |
881 | 917 | </test> |
882 | 918 | <test expect_num_outputs="4"> |
883 | | - <conditional name="in"> |
| 919 | + <conditional name="input_conditional"> |
884 | 920 | <!-- raw fasta file --> |
885 | 921 | <param name="selector" value="raw"/> |
886 | 922 | <param name="input" value="demo.fastq.gz"/> |
@@ -956,7 +992,7 @@ humann |
956 | 992 | </test> |
957 | 993 | <!-- This test should fail for as metaphlan v4 is invoked on outdated input DB. --> |
958 | 994 | <test expect_exit_code="1" expect_failure="true"> |
959 | | - <conditional name="in"> |
| 995 | + <conditional name="input_conditional"> |
960 | 996 | <!-- raw fasta file --> |
961 | 997 | <param name="selector" value="raw"/> |
962 | 998 | <param name="input" value="demo.fastq.gz"/> |
|
0 commit comments