diff humann2_rename_table.xml @ 1:b6d4c448782f draft

planemo upload for repository https://github.com/ASaiM/galaxytools/tree/master/tools/humann2/ commit 6753a2c0fec9222f5977cab43a855c63fa9f7bee
author iuc
date Tue, 01 Aug 2017 07:55:21 -0400
parents dd4b5b9daf6b
children 252ae00df89c
line wrap: on
line diff
--- a/humann2_rename_table.xml	Mon Mar 13 12:37:08 2017 -0400
+++ b/humann2_rename_table.xml	Tue Aug 01 07:55:21 2017 -0400
@@ -6,47 +6,74 @@
     <expand macro="requirements"/>
     <expand macro="version"/>
     <command detect_errors="exit_code"><![CDATA[
-        humann2_rename_table
-            --input '$input'
-            -o '$output_table'
-            --names '$names'
-            $simplify 
-            #if $custom
-                --custom '$custom'
-            #end if
+humann2_rename_table
+    --input '$input'
+    -o '$output_table'
+    #if $renaming.type == 'standard'
+        --names '$renaming.names'
+    #else
+        --custom '$renaming.custom'
+    #end if
+    $simplify 
     ]]></command>
     <inputs>
         <param argument="--input" type="data" format="tsv,tabular" label="Gene/pathway table"/>
-        <param argument="--names" type="select" label="Table features that can be renamed">
-            <option value="metacyc-rxn" selected="true">MetaCyc reactions</option>
-            <option value="metacyc-pwy">MetaCyc pathways</option>
-            <option value="infogo1000">InfoGO1000</option>
-            <option value="uniref90">UniRef90</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="uniref50">UniRef50</option>
-            <option value="kegg-pathway">KEGG Pathway</option>
-            <option value="kegg-orthology">KEGG Orthology</option>
-        </param>
-        <param argument="--simplify" type="boolean" checked="false" truevalue="--simplify" falsevalue="" label="Remove non-alphanumeric characters from names?"/>
-        <param argument="--custom" type="data" format="tsv" 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" optional="true"/>
+        <conditional name="renaming">
+            <param name="type" type="select" label="Type of renaming">
+                <option value="standard">Standard renaming</option>
+                <option value="custom">Custom renaming</option>
+            </param>
+            <when value="standard">
+                <param argument="--names" type="select" label="Table features that can be renamed">
+                    <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="uniref50">UniRef50</option>
+                    <!--<option value="uniref90">UniRef90</option>-->
+                    <option value="kegg-pathway">KEGG Pathway</option>
+                    <option value="kegg-orthology">KEGG Orthology</option>
+                </param>
+            </when>
+            <when value="custom">
+                <param argument="--custom" type="data" format="tsv" 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="tsv" name="output_table" label="${tool.name} on ${on_string}: Renamed table" />
     </outputs>
     <tests>
         <test>
-            <param name="input" value="demo_genefamilies.tsv"/>
-            <param name="names" value="uniref90" />
+            <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_table">
                 <assert_contents>
-                    <has_text text="UniRef90_R6I0Z3: NO_NAME|g__Bacteroides.s__Bacteroides_vulgatus" />
-                    <has_text text="UniRef90_I9RGY5: Tape measure domain-containing protein|g__Bacteroides.s__Bacteroides_dorei" />
-                    <has_text text="UniRef90_C3RF26: HRDC domain protein" />
+                    <has_text text="GO:0000015: [CC] phosphopyruvate hydratase complex" />
+                    <has_text text="GO:0000287: [MF] magnesium ion binding" />
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="input" value="regrouped_gene_families_to_infogo1000.tsv"/>
+            <conditional name="renaming">
+                <param name="type" value="custom"/>
+                <param name="custom" value="rename_mapping" />
+            </conditional>
+            <param name="simplify" value=""/>
+            <output name="output_table">
+                <assert_contents>
+                    <has_text text="GO:0000015: GO1" />
+                    <has_text text="GO:0000107: NO_NAME" />
                 </assert_contents>
             </output>
         </test>