changeset 1:fd5533e57354 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/picrust commit d2e3207994a1a796366a0026396f40f8b88af0c3
author iuc
date Wed, 30 Aug 2017 04:49:00 -0400
parents a94f4d96045c
children 360614e4ed29
files README.md categorize_by_function.xml macros.xml tool-data/picrust_precalculated.loc.sample
diffstat 4 files changed, 62 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md	Wed Aug 30 04:49:00 2017 -0400
@@ -0,0 +1,34 @@
+## PICRUSt Galaxy Wrapper
+
+This page is for anyone interested in installing [PICRUSt](http://picrust.github.io/picrust/) in a [galaxy instance](https://galaxyproject.org/).The below descriptions should clarify the most confusing part of the installation.
+
+The most important steps are that you need to go to the Galaxy IUC tool shed and install the 4 wrapper scripts there along with PICRUSt itself. If you install PICRUSt through this interface the precalculated files will not also be installed, you will need to download them separately (see below).
+
+Once these scripts are installed sections like the one below should be added to *galaxy/config/shed_tool_data_table_conf.xml* automatically. They will point to different *picrust_precalculated.loc* files; you only need to edit one of them since all of these files will be checked.
+
+```
+<tables>
+    <table name="picrust_precalculated" comment_char="#">
+        <columns>name, value</columns>
+        <file path="tool-data/picrust_precalculated.loc" />
+    </table>
+</tables>
+```
+
+You should download the precalculated files from http://kronos.pharmacology.dal.ca/public_files/picrust/picrust_precalculated_v1.1.1/13_5/.
+
+Most users only use the below two files (however you can also download the precalculated COG and RFAM abundances):
+```
+16S_13_5_precalculated.tab.gz
+ko_13_5_precalculated.tab.gz
+```
+
+Once you download these files we just need to point to them in a *picrust_precalculated.loc* file.
+
+An example file is shown below. Note that tabs should separate the two columns and that in the below command "16S 13_5" (separated by one space) is one example dbname.
+
+```
+<dbname>       <file_base>
+16S 13_5    /path/to/16S_13_5_precalculated.tab.gz
+ko 13_5    /path/to/ko_13_5_precalculated.tab.gz
+```
--- a/categorize_by_function.xml	Thu Dec 08 06:27:47 2016 -0500
+++ b/categorize_by_function.xml	Wed Aug 30 04:49:00 2017 -0400
@@ -1,5 +1,5 @@
-<tool id="picrust_categorize" name="Categorize by function" version="@WRAPPER_VERSION@.0">
-    <description>collapse hierarchical data to a specified level</description>
+<tool id="picrust_categorize" name="Categorize" version="@WRAPPER_VERSION@.0">
+    <description>by collapsing hierarchical data to a specified functional level</description>
     <macros>
         <import>macros.xml</import>
     </macros>
@@ -11,12 +11,11 @@
             -c $metadata_category
             -l $level
             -o tempbiom
-            $format_tab_delimited
 
             @OUTPUT_CONVERSION_COMMANDS@
     ]]></command>
     <inputs>
-        <param argument="--input_fp" format="tabular,biom1" type="data" label="Input file" help="the output from the PICRISt predict tool"/>
+        <param argument="--input_fp" format="biom1,h5" type="data" label="Input file" help="Biom file that is output from the PICRISt predict tool"/>
         <param argument="--metadata_category" type="select" multiple="false" label="Metadata category that describes the hierarchy" help="">
             <option value="KEGG_Pathways" selected="true">KEGG Pathways</option>
             <option value="COG_Category">COG Category</option>
@@ -24,23 +23,18 @@
         </param>
         <param argument="--level" type="integer" value="3" min="1" label="Hierarchy Level"
                help="a value of 1 is the highest level, and any higher value nears the leaves of the hierarchy. For instance, if the hierarchy contains 4 levels, specifying 3 would collapse at one level above being fully specified"/>
-        <param argument="--format_tab_delimited" type="boolean" truevalue="-f" falsevalue="" checked="false" label="output the predicted metagenome table in tab-delimited" help="will contain the metadata lost in the classic output"/>
         <expand macro="biom_format_select"/>
     </inputs>
     <outputs>
         <expand macro="biom_output"/>
-        <data name="out_tabdel" format="tabular" from_work_dir="tempbiom" label="${tool.name} on ${on_string}: metagenome table">
-            <filter>format_tab_delimited</filter>
-        </data>
     </outputs>
     <tests>
         <test> <!-- test with Kegg Pathways and json output -->
             <param name="input_fp" value="predicted_metagenomes.L3.biom"/>
             <param name="metadata_category" value="KEGG_Pathways"/>
             <param name="level" value="2"/>
-            <param name="format_tab_delimited" value="-f"/>
             <param name="output_type" value="json"/>
-            <output name="out_biom" ftype="json">
+            <output name="out_biom" ftype="biom1">
                 <assert_contents>
                     <has_text text="Biological Observation Matrix"/>
                     <has_text text="generated_by"/>
@@ -49,23 +43,20 @@
                     <not_has_text text="ABC transporters"/>
                 </assert_contents>
             </output>
-            <output name="out_tabdel" ftype="tabular" file="tempout.table"/>
         </test>
         <test> <!-- test with COG categories and classic output -->
             <param name="input_fp" value="cog_predicted_metagenomes.L2.biom"/>
             <param name="metadata_category" value="COG_Category"/>
             <param name="level" value="1"/>
-            <param name="format_tab_delimited" value="-f"/>
             <param name="output_type" value="tsv"/>
             <output name="out_biom" ftype="tabular" md5="7682875d365f884b399ffa521952dbd8"/>
-            <output name="out_tabdel" ftype="tabular" md5="e3545484ff53bf8650725573af2ebbb9"/>
         </test>
         <test> <!-- test with taxonomy metadata and hdf5 output -->
             <param name="input_fp" value="observation_table.biom"/>
             <param name="metadata_category" value="taxonomy"/>
             <param name="level" value="1"/>
             <param name="output_type" value="hdf5"/>
-            <output name="out_biom" ftype="hdf5" file="categorize_biom.hdf5" compare="sim_size"/>
+            <output name="out_biom" ftype="h5" file="categorize_biom.hdf5" compare="sim_size"/>
         </test>
     </tests>
     <help>
--- a/macros.xml	Thu Dec 08 06:27:47 2016 -0500
+++ b/macros.xml	Wed Aug 30 04:49:00 2017 -0400
@@ -1,8 +1,8 @@
 <macros>
-    <token name="@WRAPPER_VERSION@">1.0.1</token>
+    <token name="@WRAPPER_VERSION@">1.1.1</token>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="1.0.1">picrust</requirement>
+            <requirement type="package" version="1.1.1">picrust</requirement>
         </requirements>
     </xml>
 
@@ -31,8 +31,15 @@
 
     <xml name="biom_format_select">
         <param name="output_type" type="select" label="Format of the output BIOM file">
-            <option value="json" selected="true">JSON</option>
-            <option value="hdf5">HDF5</option>
+            <option value="hdf5" selected="true">HDF5</option>
+            <option value="json">JSON</option>
+            <option value="tsv">Classic (tab-separated text)</option>
+        </param>
+    </xml>
+
+    <xml name="biom_format_select_no_json">
+        <param name="output_type" type="select" label="Format of the output BIOM file">
+            <option value="hdf5" selected="true">HDF5</option>
             <option value="tsv">Classic (tab-separated text)</option>
         </param>
     </xml>
@@ -40,20 +47,20 @@
     <xml name="biom_output">
         <data name="out_biom" format="tabular" label="${tool.name} on ${on_string}: Normalized OTUs">
             <change_format>
-                <when input="output_type" value="json" format="json"/>
+                <when input="output_type" value="json" format="biom1"/>
                 <when input="output_type" value="tsv" format="tabular"/>
-                <when input="output_type" value="hdf5" format="hdf5"/>
+                <when input="output_type" value="hdf5" format="h5"/>
             </change_format>
         </data>
     </xml>
 
     <token name="@OUTPUT_CONVERSION_COMMANDS@"><![CDATA[
-        #if $output_type == "json":
-            && biom convert -i tempbiom -o '$out_biom' --to-json
+        #if $output_type == "hdf5":
+            && mv tempbiom '$out_biom'
         #elif $output_type == "tsv":
             && biom convert -i tempbiom -o '$out_biom' --to-tsv
-        #else
-            && biom convert -i tempbiom -o '$out_biom' --to-hdf5
+        #else:
+            && biom convert -i tempbiom -o '$out_biom' --to-json
         #end if
     ]]></token>
 
@@ -69,13 +76,13 @@
 
 For more information please visit:
 
-- Picrust Documentation: https://picrust.github.io/picrust/
-- Picrust GitHub: http://picrust.github.com/
-- Picrust Support: https://groups.google.com/d/forum/picrust-users
+- PICRUSt Documentation: https://picrust.github.io/picrust/
+- PICRUSt GitHub: http://picrust.github.com/
+- PICRUSt Support: https://groups.google.com/d/forum/picrust-users
 
 **Reference Data**
 
-Precalculated files: ftp://ftp.microbio.me/pub/picrust-references/picrust-1.0.0/
+Precalculated files: http://kronos.pharmacology.dal.ca/public_files/picrust/picrust_precalculated_v1.1.1/13_5/
 
 ]]>
     </token>
--- a/tool-data/picrust_precalculated.loc.sample	Thu Dec 08 06:27:47 2016 -0500
+++ b/tool-data/picrust_precalculated.loc.sample	Wed Aug 30 04:49:00 2017 -0400
@@ -1,6 +1,6 @@
 #This is a sample file distributed with Galaxy.
 #
-# PICRUSt supplied files: ftp://ftp.microbio.me/pub/picrust-references/picrust-1.0.0/
+# PICRUSt supplied files: http://kronos.pharmacology.dal.ca/public_files/picrust/picrust_precalculated_v1.1.1/13_5/
 #
 # files may be in gzipped format or unzipped
 #
@@ -8,3 +8,4 @@
 #16S 13_5	/path/to/file/16S_13_5_precalculated.tab.gz
 #cog 13_5	/path/to/file/cog_13_5_precalculated.tab
 #ko 13_5	/path/to/file/ko_13_5_precalculated.tab.gz
+#rfam 13_5	/path/to/file/rfam_13_5_precalculated.tab.gz