diff humann_rename_table.xml @ 0:d24841f5c3d2 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/humann commit 077b8f34e081e6c427acb0fde0fbb97d1b241e0b"
author iuc
date Wed, 12 May 2021 09:02:43 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/humann_rename_table.xml	Wed May 12 09:02:43 2021 +0000
@@ -0,0 +1,117 @@
+<tool id="humann_rename_table" name="Rename features" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>of a HUMAnN generated table</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="edam_ontology"/>
+    <expand macro="requirements"/>
+    <expand macro="version"/>
+    <command detect_errors="exit_code"><![CDATA[
+humann_rename_table
+    --input '$input'
+    -o '$output'
+#if $renaming.type == 'standard'
+    --names '$renaming.names'
+#else if $renaming.type == 'advanced'
+    --custom '$renaming.names.fields.path'
+#else
+    --custom '$renaming.custom'
+#end if
+    $simplify 
+    ]]></command>
+    <inputs>
+        <param argument="--input" type="data" format="tsv,tabular" label="Gene/pathway table"/>
+        <conditional name="renaming">
+            <param name="type" type="select" label="Type of feature renaming">
+                <option value="standard">Basic feature renaming</option>
+                <option value="advanced">Advanced feature renaming</option>
+                <option value="custom">Custom feature renaming</option>
+            </param>
+            <when value="standard">
+                <param argument="--names" type="select" label="Features to be renamed" help="More features can be renamed with advanced mode">
+                    <option value="metacyc-rxn" selected="true">MetaCyc reactions</option>
+                    <option value="metacyc-pwy">MetaCyc pathways</option>
+                    <option value="infogo1000">InfoGO1000</option>
+                    <option value="kegg-module">KEGG Module</option>
+                    <option value="ec">Enzyme commision (EC)</option>
+                    <option value="go">Gene Ontology (GO)</option>
+                    <option value="pfam">PFAM</option>
+                    <option value="eggnog">eggNOG</option>
+                    <option value="kegg-pathway">KEGG Pathway</option>
+                    <option value="kegg-orthology">KEGG Orthology</option>
+                </param>
+            </when>
+            <when value="advanced">
+                <param name="names" type="select" label="Features to be renamed">
+                    <options from_data_table="humann_utility_mapping">
+                        <validator message="No utility mapping is available" type="no_options" />
+                        <filter type="regexp" column="0" value=".*name" keep="true" />
+                    </options>
+                </param>
+            </when>
+            <when value="custom">
+                <param argument="--custom" type="data" format="tsv,tabular" label="Mapping file" help="The mapping file must be tabular format file with two tab-separated columns. The first column must contain the value you want to modify and the second contain the new value"/>
+            </when>
+        </conditional>
+        <param argument="--simplify" type="boolean" truevalue="--simplify" falsevalue="" checked="false" label="Remove non-alphanumeric characters from names?"/>
+    </inputs>
+    <outputs>
+        <data format="tabular" name="output"/>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="input" value="regrouped_gene_families_to_infogo1000.tsv"/>
+            <conditional name="renaming">
+                <param name="type" value="standard"/>
+                <param name="names" value="infogo1000" />
+            </conditional>
+            <param name="simplify" value=""/>
+            <output name="output" ftype="tabular">
+                <assert_contents>
+                    <has_text text="GO:0000015: [CC] phosphopyruvate hydratase complex" />
+                    <has_text text="GO:0000287: [MF] magnesium ion binding" />
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input" value="demo_genefamilies.tsv"/>
+            <conditional name="renaming">
+                <param name="type" value="advanced"/>
+                <param name="names" value="utility_mapping-full-map_uniref90_name-3.0.0-29042021"/>
+            </conditional>
+            <param name="simplify" value=""/>
+            <output name="output" ftype="tabular">
+                <assert_contents>
+                    <has_text text="UniRef90_A6L2T0: NO_NAME|g__Bacteroides.s__Bacteroides_vulgatus" />
+                    <has_text text="UniRef90_U5FT06: Hexosyltransferase|unclassified" />
+                    <has_text text="UniRef90_Q8GT21: Benzyl alcohol O-benzoyltransferase|unclassified" />
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input" value="demo_genefamilies.tsv"/>
+            <conditional name="renaming">
+                <param name="type" value="custom"/>
+                <param name="custom" value="test-db/utility_mapping/map_uniref90_name.txt" />
+            </conditional>
+            <param name="simplify" value=""/>
+            <output name="output" ftype="tabular">
+                <assert_contents>
+                    <has_text text="UniRef90_A6L2T0: NO_NAME|g__Bacteroides.s__Bacteroides_vulgatus" />
+                    <has_text text="UniRef90_U5FT06: Hexosyltransferase|unclassified" />
+                    <has_text text="UniRef90_Q8GT21: Benzyl alcohol O-benzoyltransferase|unclassified" />
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+@HELP_HEADER@
+
+By default, HUMAnN outputs do not attach names (glosses) to individual feature IDs to keep file sizes down. 
+This tool is used to attach those names.
+
+The most common use for this tool is attaching gene names to UniRef90/UniRef50 features in the default gene family output files.
+Features without names (common for many UniRef90/50 families) are assigned the default name: NO_NAME.
+    ]]></help>
+    <expand macro="citations"/>
+</tool>