changeset 1:2fa7594063b1 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:42 -0400
parents 2d4c0825cfe6
children 13c9a39b9308
files README.md macros.xml predict_metagenomes.xml tool-data/picrust_precalculated.loc.sample
diffstat 4 files changed, 65 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md	Wed Aug 30 04:49:42 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/macros.xml	Thu Dec 08 06:28:50 2016 -0500
+++ b/macros.xml	Wed Aug 30 04:49:42 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/predict_metagenomes.xml	Thu Dec 08 06:28:50 2016 -0500
+++ b/predict_metagenomes.xml	Wed Aug 30 04:49:42 2017 -0400
@@ -1,5 +1,5 @@
 <tool id="picrust_predict_metagenomes" name="Predict Metagenome" version="@WRAPPER_VERSION@.0">
-    <description>create a virtual metagenome of KEGG Ortholog abundances</description>
+    <description>based on the abundance of OTUs and a functional database</description>
     <macros>
         <import>macros.xml</import>
     </macros>
@@ -19,9 +19,9 @@
             @OUTPUT_CONVERSION_COMMANDS@
     ]]></command>
     <inputs>
-        <param name="input_data" type="data" format="tabular,biom1" label="Input file"/>
+        <param name="input_data" type="data" format="biom1,h5" label="Input biom file that is output of normalize_by_copy_number.py"/>
         <expand macro="otu-reference-precalculated"/>
-        <expand macro="biom_format_select"/>
+        <expand macro="biom_format_select_no_json"/>
         <param argument="normalize_by_function" type="boolean" truevalue="--normalize_by_function" falsevalue="" checked="false" label="Normalize by function?"
                help="Normalizes the predicted functional abundances by dividing each abundance by the sum of functional abundances in the sample. Total sum of abundances for each sample will equal 1"/>
         <param argument="normalize_by_otu" type="boolean" truevalue="--normalize_by_otu" falsevalue="" checked="false" label="Normalize by OTU?"
@@ -36,19 +36,7 @@
        </data>
     </outputs>
     <tests>
-        <test> <!-- test with defaults -->
-            <param name="input_data" value="normalized_otus.biom"/>
-            <param name="source" value="hist"/>
-            <param name="precalc" value="16S_13_5_precalculated_minimal.tab"/>
-            <param name="output_type" value="json"/>
-            <output name="out_file" ftype="json">
-                <assert_contents>
-                    <has_text text="Biological Observation Matrix"/>
-                    <has_text text="generated_by"/>
-                </assert_contents>
-            </output>
-        </test>
-        <test> <!-- test with accuracy metrics and normalizations -->
+       <test> <!-- test with accuracy metrics and normalizations -->
             <param name="input_data" value="otu_table_for_custom_trait_table.biom"/>
             <param name="source" value="hist"/>
             <param name="precalc" value="custom_trait_table.tab"/>
@@ -56,7 +44,7 @@
             <param name="accuracy_metrics" value="T"/>
             <param name="normalize_by_function" value="--normalize_by_function"/>
             <param name="normalize_by_otu" value="--normalize_by_otu"/>
-            <output name="out_file" ftype="tabular">
+            <output name="out_biom" ftype="tabular">
                 <assert_contents>
                     <has_text text="trait2"/>
                     <has_text text="Sample4"/>
@@ -77,10 +65,12 @@
 
 **Command Documentation**
 
-This module produces a 'virtual' metagenome of KEGG Ortholog abundances for each sample in the given OTU table.
+This module produces a 'virtual' metagenome of functional abundances for each sample in the given OTU table. Choose either the KEGG Ortholog (KO), Clusters of Orthologous Genes (COG), or non-coding and other structured RNA (Rfam) precalculated files.
 
 **Input file:** This should be a normalized OTU table populated by the output of the PICRUSt Normalize by Copy Number module.
 
+Make sure that you specify an appropriate functional database for this command (usually the ko, cog, or rfam v13_5 database).
+
 ]]>
     </help>
     <expand macro="citations"/>
--- a/tool-data/picrust_precalculated.loc.sample	Thu Dec 08 06:28:50 2016 -0500
+++ b/tool-data/picrust_precalculated.loc.sample	Wed Aug 30 04:49:42 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