changeset 1:47bfbd6597d0 draft

planemo upload commit 636fd1c7e60779d1123056a2985d54881013d4cb
author galaxyp
date Wed, 05 Dec 2018 14:37:17 -0500
parents b17b03126d40
children a8cb3dea93a6
files macros.xml metaquantome_expand.xml metaquantome_filter.xml metaquantome_viz.xml
diffstat 4 files changed, 124 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Tue Dec 04 17:17:41 2018 -0500
+++ b/macros.xml	Wed Dec 05 14:37:17 2018 -0500
@@ -6,6 +6,24 @@
             <yield/>
         </requirements>
     </xml>
+    <xml name="ONTOLOGY_ARGS">
+        <conditional name="ontology_args">
+            <param name="ontology" type="select" label="Ontology">
+                <option value="go">GO Gene Ontology (column named 'go')</option>
+                <option value="ec">EC Enzyme Commission (column named 'ec')</option>
+                <option value="cog">COG (column named 'cog')</option>
+            </param>
+            <when value="go">
+                <param argument="--slim_down" type="boolean" label="Use slim GO"/>
+            </when>
+            <when value="ec">
+                <!-- do nothing -->
+            </when>
+            <when value="cog">
+                <!-- do nothing -->
+            </when>
+        </conditional>
+    </xml>
     <xml name="FUNC_FILE">
         <param argument="--func_file" type="data" format="tabular" label="Functional file"
             help="Tabular file with a peptide sequence column and a functional assignment column for GO-term, EC number, or COG."/>
@@ -50,7 +68,7 @@
     </token>
     <token name="@DB_DIR@"><![CDATA[
         #if $db_dir.db_loc == 'auto':
-            #if $mode_args.mode == 'taxfn'
+            #if $mode_args.mode == 'ft'
                 --ft_func_data_dir data
                 --ft_tax_data_dir  data
             #else
@@ -85,6 +103,27 @@
             --samps samp_file.tab
             --mode '$mode_args.mode'
             #if $mode_args.mode == 'f'
+                --ontology='$mode_args.ontology_args.ontology'
+                #if $mode_args.ontology_args.ontology == 'go'
+                    #if $mode_args.ontology_args.slim_down
+                        --slim_down
+                    #end if
+                #end if
+            #end if
+            #if $mode_args.mode == 'ft'
+                --ontology='$mode_args.ontology_args.ontology'
+                #if $mode_args.ontology_args.ontology == 'go'
+                    #if $mode_args.ontology_args.slim_down
+                        --slim_down
+                    #end if
+                #end if
+            #end if
+    ]]>
+    </token>
+    <token name="@EXPAND_PARAMS@"><![CDATA[
+            --samps samp_file.tab
+            --mode '$mode_args.mode'
+            #if $mode_args.mode == 'f'
                 --func_file='$mode_args.func_file'
                 --func_colname='$mode_args.func_colname'
                 --pep_colname_func='$mode_args.pep_colname_func'
@@ -104,7 +143,12 @@
                 --func_file='$mode_args.func_file'
                 --func_colname='$mode_args.func_colname'
                 --pep_colname_func='$mode_args.pep_colname_func'
-                --ontology=$mode_args.ontology
+                --ontology='$mode_args.ontology_args.ontology'
+                #if $mode_args.ontology_args.ontology == 'go'
+                    #if $mode_args.ontology_args.slim_down
+                        --slim_down
+                    #end if
+                #end if
                 --tax_file='$mode_args.tax_file'
                 --tax_colname='$mode_args.tax_colname'
                 --pep_colname_tax='$mode_args.pep_colname_tax'
@@ -112,6 +156,7 @@
             #end if
     ]]>
     </token>
+
     <xml name="SAMPS">
         <conditional name="samps_args">
             <param argument="samps_src" type="select" label="Samples">
@@ -138,29 +183,33 @@
                 <option value="ft">Functional-taxonomic interaction analysis</option>
             </param>
             <when value="f">
+                <expand macro="ONTOLOGY_ARGS"/>
+            </when>
+            <when value="t">
+            </when>
+            <when value="ft">
+                <expand macro="ONTOLOGY_ARGS"/>
+            </when>
+        </conditional>
+        <expand macro="SAMPS"/>
+    </xml>
+    <xml name="expand_params">
+        <conditional name="mode_args">
+            <param argument="--mode" type="select" label="Mode">
+                <option value="f">Functional analysis</option>
+                <option value="t">Taxonomic analysis</option>
+                <option value="ft">Functional-taxonomic interaction analysis</option>
+            </param>
+            <when value="f">
                 <expand macro="FUNC_FILE"/>
-                <conditional name="ontology_args">
-                    <param name="ontology" type="select" label="Ontology">
-                        <option value="go">GO Gene Ontology (column named 'go')</option>
-                        <option value="ec">EC Enzyme Commission (column named 'ec')</option>
-                        <option value="cog">COG (column named 'cog')</option>
-                    </param>
-                    <when value="go">
-                        <param argument="--slim_down" type="boolean" label="Use slim GO"/>
-                    </when>
-                    <when value="ec">
-                        <!-- do nothing -->
-                    </when>
-                    <when value="cog">
-                        <!-- do nothing -->
-                    </when>
-                </conditional>
+                <expand macro="ONTOLOGY_ARGS"/>
             </when>
             <when value="t">
                 <expand macro="TAX_FILE"/>
             </when>
             <when value="ft">
                 <expand macro="FUNC_FILE"/>
+                <expand macro="ONTOLOGY_ARGS"/>
                 <expand macro="TAX_FILE"/>
                 <param argument="--ft_tar_rank" type="select" label="rank at which to group taxonomy">
                     <option value="species">species</option>
@@ -175,6 +224,7 @@
         </conditional>
         <expand macro="SAMPS"/>
     </xml>
+
     <xml name="output_samples_choice">
         <param name="output_samps" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Output the samples fiile"/>
     </xml>
--- a/metaquantome_expand.xml	Tue Dec 04 17:17:41 2018 -0500
+++ b/metaquantome_expand.xml	Wed Dec 05 14:37:17 2018 -0500
@@ -8,7 +8,7 @@
         mkdir -p data && #slurp
         @MAKE_SAMPS_TSV@
         metaquantome expand
-        @COMMON_PARAMS@
+        @EXPAND_PARAMS@
         @DB_DIR@
         #if $input.input_type == 'nopep':
             --nopep --nopep_file='$input.nopep_file' 
@@ -20,7 +20,7 @@
     ]]></command>
     <inputs>
         <expand macro="data_dir"/>
-        <expand macro="common_params"/>
+        <expand macro="expand_params"/>
         <conditional name="input">
             <param name="input_type" type="select" label="Select input data">
                 <option value="int">tabular intensity file with peptide column</option>
--- a/metaquantome_filter.xml	Tue Dec 04 17:17:41 2018 -0500
+++ b/metaquantome_filter.xml	Wed Dec 05 14:37:17 2018 -0500
@@ -11,18 +11,20 @@
         --expand_file '$expand_file'
         --min_peptides $min_peptides 
         #if $min_pep_nsamp:
-            --min_pep_nsamp max($min_peptides,$min_pep_nsamp)
+            #set $nsamp = max(int($min_peptides),int($min_pep_nsamp))
+            --min_pep_nsamp $nsamp
         #else
             --min_pep_nsamp all
         #end if
         --min_children_non_leaf $min_children_non_leaf
         #if $min_child_nsamp:
-            --min_child_nsamp max($min_peptides,$min_child_nsamp)
+            #set $nsamp = max($min_peptides,$min_child_nsamp)
+            --min_child_nsamp $nsamp
         #else
             --min_child_nsamp all
         #end if
         --qthreshold $qthreshold
-        --outfile='$output'
+        --outfile='$outfile'
     ]]></command>
     <inputs>
         <expand macro="common_params"/>
--- a/metaquantome_viz.xml	Tue Dec 04 17:17:41 2018 -0500
+++ b/metaquantome_viz.xml	Wed Dec 05 14:37:17 2018 -0500
@@ -3,16 +3,26 @@
     <macros>
         <import>macros.xml</import>
         <xml name="img_size">
+            <param argument="--width" type="float" value="" optional="true" label="Image width in inches"/>       
             <param argument="--height" type="float" value="" optional="true" label="Image height in inches"/>       
-            <param argument="--width" type="float" value="" optional="true" label="Image width in inches"/>       
         </xml>
         <xml name="common_bar_params">
+                <param argument="--target_rank" type="text" value="species" label="Taxonomic rank to restrict to in the plot"
+                        help="">
+                    <option value="species">species</option>
+                    <option value="genus" selected="true">genus</option>
+                    <option value="family">family</option>
+                    <option value="order">order</option>
+                    <option value="class">class</option>
+                    <option value="phylum">phylum</option>
+                    <option value="kingdom">kingdom</option>
+                </param>
                 <param argument="--meancol" type="text" label="Mean intensity column name"
                         help="Mean intensity column name for desired experimental condition">
                         <validator type="empty_field"/>
                 </param>
-                <param argument="--nterms" type="integer" value="5" min="1" label="Number of taxa or functional terms to display"/>
-                <param argument="--barcolor" type="integer" value="1" min="1" max="6" label="Color for the bar fill">
+                <param argument="--nterms" type="integer" value="5" min="1" optional="true" label="Number of taxa or functional terms to display" help="leave blank for all"/>
+                <param argument="--barcol" type="integer" value="1" min="1" max="6" label="Color for the bar fill">
                     <help>
                         The color vector in R is
                         c("dodgerblue", "darkorange", "yellow2", "red2", "darkviolet", "black"), 
@@ -31,14 +41,23 @@
         --infile='$infile'
         --plottype=$plot.plottype
         #if $plot.plottype == 'bar':
+            #if str($mode_args.mode) in ['t','ft']:
+                --target_rank='$plot.target_rank'
+            #end if
             --meancol='$plot.meancol'
-            --nterms=$plot.nterms
-            --barcolor=$plot.barcolor
+            #if str($plot.nterms) == '':
+                --nterms='all'
+            #else
+                --nterms=$plot.nterms
+            #end if
+            --barcol=$plot.barcol
         #elif $plot.plottype == 'volcano':
-            --fc='$plot.fc'
+            --meancol='$plot.meancol'
+            --fc_name='$plot.fc_name'
             #if $plot.textannot:
                 --textannot='$plot.textannot'
             #end if
+            $plot.flip_fc
             $plot.gosplit
         #elif $plot.plottype == 'heatmap':
             $plot.filter_to_sig
@@ -47,8 +66,12 @@
             $plot.calculate_sep
         #elif $plot.plottype == 'ft_dist':
             --meancol='$plot.meancol'
-            --nterms=$plot.nterms
-            --barcolor=$plot.barcolor
+            #if str($plot.nterms) == '':
+                --nterms='all'
+            #else
+                --nterms=$plot.nterms
+            #end if
+            --barcol=$plot.barcol
             --whichway=$plot.whichway
             #if $plot.term.id_or_name == 'id':
                 --id='$plot.term.id'
@@ -59,12 +82,12 @@
                 --target_onto=$plot.target_onto
             #end if
         #end if
+        #if $plot.width:
+            --width=$plot.width
+        #end if
         #if $plot.height:
             --height=$plot.height
         #end if
-        #if $plot.width1:
-            --width=$plot.width
-        #end if
         --img='outfile.png'
     ]]></command>
     <inputs>
@@ -73,22 +96,28 @@
                     help=""/>
         <conditional name="plot">
             <param argument="--plottype" type="select" label="Plot type">
-                <option value="bar">Bar Chart</option>
-                <option value="volcano">Volcano Plot</option>
-                <option value="heatmap">Heatmap</option>
-                <option value="pca">PCA - Principal Componets Analysis</option>
-                <option value="ft_dist">Bar Chart</option>
+                <option value="bar">Bar Charti (bar)</option>
+                <option value="volcano">Volcano Plot (volcano)</option>
+                <option value="heatmap">Heatmap (heatmap)</option>
+                <option value="pca">Principal Componets Analysis (pca)</option>
+                <option value="ft_dist">Functional Taxonomic Distribution (ft_dist)</option>
             </param>
             <when value="bar">
                 <expand macro="common_bar_params"/>
                 <expand macro="img_size"/>
             </when>
             <when value="volcano">
-                <param argument="--fc" type="text" label="Name of the fold change column in the stat dataframe">
+                <param argument="--meancol" type="text" label="Mean intensity column name"
+                        help="Mean intensity column name for desired experimental condition">
+                        <validator type="empty_field"/>
+                </param>
+                <param argument="--fc_name" type="text" label="Name of the fold change column in the stat dataframe">
                         <validator type="empty_field"/>
                 </param>
                 <param argument="--textannot" type="text" optional="true" label="Name of the annotation column" 
                     help="Provides text annoatation for the plot.  Optional, if missing, no text will be plotted."/>
+                <param argument="--flip_fc" type="boolean" truevalue="--flip_fc" falsevalue="" checked="false" 
+                    label="Flip the fold change (i.e., multiply log fold change by -1)"/>
                 <param argument="--gosplit" type="boolean" truevalue="--gosplit" falsevalue="" checked="false" 
                     label="Make one plot for each of BiologicalProcess, CellularComponent, and MolecularFunction"/>
                 <expand macro="img_size"/>
@@ -96,7 +125,7 @@
             <when value="heatmap">
                 <param argument="--filter_to_sig" type="boolean" truevalue="--filter_to_sig" falsevalue="" checked="false" 
                     label="Only plot significant term" help="Necessitates use of results from `test`"/>
-                <param argument="--aplha" type="float" value="0.05" min="0.0" max="1.0" label="If filter_to_sig, the q-value significance level"/>
+                <param argument="--alpha" type="float" value="0.05" min="0.0" max="1.0" label="If filter_to_sig, the q-value significance level"/>
                 <expand macro="img_size"/>
             </when>
             <when value="pca">
@@ -107,8 +136,8 @@
             <when value="ft_dist">
                 <expand macro="common_bar_params"/>
                 <param argument="--whichway" type="select" label="which distribution">
-                    <option value="f_dist">functional distribution for a taxon</option>
-                    <option value="t_dist">taxonomic distribution for a function</option>
+                    <option value="f_dist">functional distribution for a taxon (f_dist)</option>
+                    <option value="t_dist">taxonomic distribution for a function (t_dist)</option>
                 </param>
                 <conditional name="term">
                     <param argument="id_or_name" type="select" label="">