diff metaquantome_viz.xml @ 4:80ce9ca55697 draft

planemo upload commit d27827cf38d30b9c98923f73bc9cae4ffe41361b
author galaxyp
date Fri, 07 Dec 2018 13:43:06 -0500
parents 28180bbb8fe4
children
line wrap: on
line diff
--- a/metaquantome_viz.xml	Thu Dec 06 08:50:19 2018 -0500
+++ b/metaquantome_viz.xml	Fri Dec 07 13:43:06 2018 -0500
@@ -1,10 +1,10 @@
-<tool id="metaquantome_viz" name="MetaQuantome Visualization Plots" version="@VERSION@.0">
-    <description>of taxonomic analysis, functional analysis, and function-taxonomy</description>
+<tool id="metaquantome_viz" name="metaQuantome: visualize" version="@VERSION@.0">
+    <description>taxonomic analysis, functional analysis, and function-taxonomy analysis results</description>
     <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"/>
+            <param argument="--height" type="float" value="" optional="true" label="Image height 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"
@@ -25,9 +25,9 @@
                 <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"), 
-                        so providing a 1 will give the "dodgerblue" color. 
-                        These same colors are also used in the heatmap and PCA plot, 
+                        c("dodgerblue", "darkorange", "yellow2", "red2", "darkviolet", "black"),
+                        so providing a 1 will give the "dodgerblue" color.
+                        These same colors are also used in the heatmap and PCA plot,
                         so the colors can be tweaked to match.
                     </help>
                 </param>
@@ -52,7 +52,6 @@
             #end if
             --barcol=$plot.barcol
         #elif $plot.plottype == 'volcano':
-            --meancol='$plot.meancol'
             --fc_name='$plot.fc_name'
             #if $plot.textannot:
                 --textannot='$plot.textannot'
@@ -91,7 +90,30 @@
         #if $plot.height:
             --height=$plot.height
         #end if
-        --img='outfile.png'
+        --img='outfile.png' &&
+        mkdir '${ wrapped_outfile.files_path }' &&
+        cp outfile.png '${ wrapped_outfile.files_path }' &&
+        ## stylesheet
+        echo "img {
+          display: block;
+          margin-left: auto;
+          margin-right: auto;
+          max-width: 75%;
+          height: auto;
+        }" > style.css &&
+        cp style.css '${ wrapped_outfile.files_path }' &&
+        echo "<!DOCTYPE html>
+        <html>
+          <head>
+            <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\"/>
+          </head>
+          <body>
+            <img src=\"outfile.png\">
+            <br>
+            <p>To download the image, right-click and choose \"Save image as...\"</p>
+          </body>
+        </html>" > wrapped_outfile.html &&
+        cat wrapped_outfile.html
     ]]></command>
     <inputs>
         <expand macro="common_params"/>
@@ -110,29 +132,25 @@
                 <expand macro="img_size"/>
             </when>
             <when value="volcano">
-                <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" 
+                <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" 
+                <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"/>
+                <param argument="--gosplit" type="boolean" truevalue="--gosplit" falsevalue="" checked="false"
+                    label="Make one plot for each of BiologicalProcess, CellularComponent, and MolecularFunction GO term categories."/>
                 <expand macro="img_size"/>
             </when>
             <when value="heatmap">
-                <param argument="--filter_to_sig" type="boolean" truevalue="--filter_to_sig" falsevalue="" checked="false" 
+                <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="--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">
-                <param argument="--calculate_sep" type="boolean" truevalue="--calculate_sep" falsevalue="" checked="false" 
+                <param argument="--calculate_sep" type="boolean" truevalue="--calculate_sep" falsevalue="" checked="false"
                     label="Calculate separation between groups and include in title"/>
                 <expand macro="img_size"/>
             </when>
@@ -157,11 +175,12 @@
                     <when value="name">
                        <param argument="--name" type="text" label="Taxonomic or functional term name">
                            <help>
+				Case-sensitive. Should be either a common taxonomic name ("Streptococcus") or functional term ("carbohydrate metabolic process").
                            </help>
                        </param>
                     </when>
                 </conditional>
-                <param argument="--target_onto" type="select" optional="true" label="Restrict to GO category">
+                <param argument="--target_onto" type="select" optional="false" label="GO category to restrict to">
                     <option value="bp">Biological Process</option>
                     <option value="mf">Molecular Function</option>
                     <option value="cc">Cellular Component</option>
@@ -172,6 +191,7 @@
     </inputs>
     <outputs>
         <data format="png" name="outfile" label="${tool.name} on ${on_string} ${plot.plottype}" from_work_dir="outfile.png"/>
+        <data format="html" name="wrapped_outfile" label="${tool.name} on ${on_string} ${plot.plottype}" from_work_dir="wrapped_outfile.html"/>
     </outputs>
     <tests>
         <test>
@@ -190,7 +210,23 @@
         </test>
     </tests>
     <help><![CDATA[
-        TODO: Fill in help.
+metaQuantome viz
+===================
+
+The *viz* module is the final step in the metaQuantome analysis workflow.
+The available visualizations are:
+
+- bar plot
+- volcano plot
+- heatmap
+- PCA plot
+
+Please consult the manuscript for full details on each of these plots.
+
+Questions, Comments, Problems, Kudos
+--------------------------------------
+
+Please file any issues at https://github.com/galaxyproteomics/tools-galaxyp/issues.
     ]]></help>
     <expand macro="citations" />
 </tool>