diff add_descriptions.xml @ 0:6034c3f3ecf0 draft

planemo upload for repository https://github.com/picrust/picrust2 commit 972784d909912af20cd213fc56830fee79d83ca6
author iuc
date Sat, 04 Mar 2023 20:27:58 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/add_descriptions.xml	Sat Mar 04 20:27:58 2023 +0000
@@ -0,0 +1,96 @@
+<tool id="picrust2_add_descriptions" name="PICRUSt2 Add descriptions" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>column to a function abundance table</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="bio_tool"/>
+    <expand macro="requirements"/>
+    <version_command>add_descriptions.py -v</version_command>
+    <command detect_errors="exit_code"><![CDATA[
+add_descriptions.py
+    --input '$input'
+    --output '$func_abun_table_description'
+#if $map_file.selector == "default"
+    --map_type '$map_file.map_type'
+#else if $map_file.selector == "custom"
+    --custom_map_table '$map_file.custom_map_table'
+#end if
+    ]]></command>
+    <inputs>
+        <param argument="--input" type="data" format="tabular" label="Input function (gene family or pathway) abundance table"/>
+        <conditional name="map_file">
+            <param name="selector" type="select" label="Argument specifying non-default reference files to use for sequence placement">
+                <option value="default" selected="true">Default mapping file</option>
+                <option value="custom">Customized mapping file</option>
+            </param>
+            <when value="default">
+                <param argument="--map_type" type="select" label="Mapping table to use">
+                    <option value="COG">Clusters of Orthologous Genes database (COG)</option>
+                    <option value="EC">Enzyme Commission number database (EC number)</option>
+                    <option value="KO">KEGG Orthology database (KO)</option>
+                    <option value="PFAM">Pfam database</option>
+                    <option value="TIGRFAM">TIGRFAM database</option>
+                    <option value="METACYC">Metabolic Pathway database (MetaCyc)</option>
+                </param>
+            </when>
+            <when value="custom">
+                <param argument="--custom_map_table" type="data" format="tabular" label="Custom mapping table" help="A table with at least two columns linking function ids to descriptions for each function">
+                    <validator type="dataset_metadata_in_range" metadata_name="columns" min="2" message="Input needs to have at least two columns"/>
+                </param>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="func_abun_table_description" format="tabular" from_work_dir="added_description.tsv"/>
+    </outputs>
+    <tests>
+    <test expect_num_outputs="1">
+        <param name="input" value="pred_metagenome_unstrat.tsv.gz"/>
+        <conditional name="map_file">
+            <param name="selector" value="default"/>
+            <param name="map_type" value="EC"/>
+        </conditional>
+        <output name="func_abun_table_description">
+            <assert_contents>
+                <has_text text="description"/>
+                <has_n_lines n="1000"/>
+            </assert_contents>
+        </output>
+    </test>
+    <test expect_num_outputs="1">
+        <param name="input" value="pred_metagenome_unstrat.tsv.gz"/>
+        <conditional name="map_file">
+            <param name="selector" value="custom"/>
+            <param name="custom_map_table" value="ec_unstrat_test.txt.gz"/>
+        </conditional>
+        <output name="func_abun_table_description">
+            <assert_contents>
+                <has_text text="description"/>
+                <has_n_lines n="1000"/>
+            </assert_contents>
+        </output>
+    </test>
+    </tests>
+    <help><![CDATA[
+@HELP_HEADER@
+
+Add Descriptions
+================
+Adds a description column to a function abundance table and outputs a new file.
+
+Note
+====
+The user needs to specify the input file and what type of functions are in the input table. Will throw an error if no ids overlap and otherwise will fill in "not_found" for the description of ids in the function table not in the mapfile.
+
+Input
+=====
+Input function abundance table.
+
+Output
+======
+Output function abundance table with added description column.
+    ]]></help>
+    <citations>
+        <citation type="doi">10.1038/s41587-020-0548-6</citation>
+    </citations>
+</tool>
\ No newline at end of file