diff plotwithscale.xml @ 0:25030f0d1154 draft

planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
author iuc
date Fri, 04 Aug 2017 17:51:16 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plotwithscale.xml	Fri Aug 04 17:51:16 2017 -0400
@@ -0,0 +1,149 @@
+<tool id="iwtomics_plotwithscale" name="IWTomics Plot with Threshold" version="@VERSION@.0">
+  <description>on Test Scale</description>
+  <macros>
+    <import>macros.xml</import>
+  </macros>
+  <expand macro="requirements" />
+  
+  <command detect_errors="exit_code">
+<![CDATA[
+    Rscript '$__tool_directory__/plotwithscale.R' adjustedpvalue='${adjustedpvalue}' iwtomicsrespdf='${iwtomicsrespdf}' iwtomicssumpdf='${iwtomicssumpdf}'
+      iwtomicsrdata='${rdata}'
+      iwtomicstests='${testids}'
+      iwtomicsselectedfeatures='${featureids}'
+
+      #set test_subset = '|'.join( [ str( $e.test ) for $e in $scalesection.thresholdontestscale ] )
+      test_subset='${test_subset}'
+      #set feature_subset = '|'.join( [ str( $e.feature ) for $e in $scalesection.thresholdontestscale ] )
+      feature_subset='${feature_subset}'
+      #set scale_subset = ','.join( [ str( $e.scale ) for $e in $scalesection.thresholdontestscale ] )
+      scale_subset='c(${scale_subset})'
+
+      testalpha='${plotres.alpha}'
+      average='${plotres.average}'
+      size='${plotres.size}'
+      plottype="'${plotres.conditionalplottype.plottype}'"
+      #if $plotres.conditionalplottype.plottype == 'boxplot':
+        #set probs = ','.join( [ str( $p.prob ) for $p in $plotres.conditionalplottype.probabilitiessection.probabilities ] )
+        #if $probs != "":
+          probs='c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2},${probs})'
+        #else:
+          probs='c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2})'
+        #end if
+      #end if
+
+      groupby="'${plotsum.conditionalgroupby.groupby}'"
+      #if $plotsum.conditionalgroupby.groupby == "test":
+        summaryalpha='${plotsum.conditionalgroupby.testalphaplot}'
+        only_significant='${plotsum.conditionalgroupby.testonlysig}'
+      #elif $plotsum.conditionalgroupby.groupby == "feature":
+        summaryalpha='${plotsum.conditionalgroupby.featurealphaplot}'
+        only_significant='${plotsum.conditionalgroupby.featureonlysig}'
+      #end if
+]]>
+  </command>
+
+  <inputs>
+    <!-- RData -->
+    <param format="rdata" name="rdata" type="data" label="Select IWTomicsData object with test results" help="File created by 'IWTomics Test and Plot'." />
+    <!-- test IDs -->
+    <param format="tabular" name="testids" type="data" label="Select test IDs" help="File created by 'IWTomics Test and Plot'." />
+    <!-- feature IDs -->
+    <param format="tabular" name="featureids" type="data" label="Select feature IDs" help="File created by 'IWTomics Test and Plot'." />
+
+    <!-- repeat threshold on test scale -->
+    <section name="scalesection" title="Select scale for Interval-Wise Testing and plot" expanded="True" help="Maximum interval length for the p-value adjustment. If 0 the maximum possible scale is used.">
+      <repeat name="thresholdontestscale" title="Threshold on test scale" min="1">
+        <param name="test" type="data_column" data_ref="testids" numerical="False" label="Test ID" multiple="True" use_header_names="True" />
+        <param name="feature" type="data_column" data_ref="featureids" numerical="False" label="Feature ID" multiple="True" use_header_names="True" />
+        <param name="scale" type="integer" value="0" min="0" label="Scale" />
+      </repeat>
+    </section>
+
+    <!-- plot IWTomics results -->
+    <section name="plotres" title="Plot IWTomics test results" expanded="True">
+      <!-- alpha -->
+      <param name="alpha" size="3" type="float" value="0.05" min="0.0" max="1.0" label="Level of the test (alpha)" />
+      <expand macro="plot-params" />
+    </section>
+
+    <!-- summary plot -->
+    <expand macro="plot-sum" />
+  </inputs>
+
+  <outputs>
+    <data format="txt" name="adjustedpvalue" label="${tool.name} on ${on_string}: Adjusted p-value" from_work_dir="iwtomics.plotwithscale.adjustedpvalue.txt" />
+    <data format="pdf" name="iwtomicsrespdf" label="${tool.name} on ${on_string}: Plotted Test Results" from_work_dir="iwtomics.plotwithscale.iwtomicstestresults.pdf" />
+    <data format="pdf" name="iwtomicssumpdf" label="${tool.name} on ${on_string}: Summary Plot" from_work_dir="iwtomics.plotwithscale.summaryplot.pdf" />
+  </outputs>
+
+  <tests>
+    <test>
+      <param name="rdata" value="output_testandplot/iwtomics.testandplot.RData" ftype="rdata" />
+      <param name="testids" value="output_testandplot/iwtomics.testandplot.tests.txt" ftype="tabular" />
+      <param name="featureids" value="output_testandplot/iwtomics.testandplot.selectedfeatures.txt" ftype="tabular" />
+      <repeat name="thresholdontestscale">
+        <param name="test" value="1" />
+        <param name="feature" value="1" />
+        <param name="scale" value="10" />
+      </repeat>
+      <repeat name="thresholdontestscale">
+        <param name="test" value="1,2,3" />
+        <param name="feature" value="2" />
+        <param name="scale" value="20" />
+      </repeat>
+      <param name="alpha" value="0.05" />
+      <param name="average" value="TRUE" />
+      <param name="size" value="TRUE" />
+      <param name="plottype" value="boxplot" />
+      <param name="prob0" value="0.25" />
+      <param name="prob1" value="0.5" />
+      <param name="prob2" value="0.75" />
+      <param name="groupby" value="feature" />
+      <param name="featurealphaplot" value="0.05" />
+      <param name="featureonlysig" value="TRUE" />
+      <output name="adjustedpvalue" file="output_plotwithscale/iwtomics.plotwithscale.adjustedpvalue.txt" compare="sim_size" />
+      <output name="iwtomicsrespdf" file="output_plotwithscale/iwtomics.plotwithscale.iwtomicstestresults.pdf" compare="sim_size" />
+      <output name="iwtomicssumpdf" file="output_plotwithscale/iwtomics.plotwithscale.summaryplot.pdf" compare="sim_size" />
+    </test>
+  </tests>
+
+  <help><![CDATA[
+This tool allows to select the scale for the Interval-Wise Testing results. In particular, it returns the p-value curves
+for the different tests performed at the selected scale, and it creates a graphical representation of the
+Interval-Wise Testing results and a summary plot (optional) at the selected scale.
+
+-----
+
+**Input files**
+
+RData file with the IWTomicsData object with test results, tabular files with test IDs and feature IDs.
+These files are created by the tool *IWTomics Test and Plot*.
+
+-----
+
+**Output**
+
+The tool returns:
+
+1. TXT file with an adjusted p-value curve for every test performed at the selected scale;
+2. PDF file with the plotted test results;
+3. PDF file with the summary plot.
+
+-----
+
+.. class:: infomark
+
+**Notes**
+
+This Galaxy tool has been developed by Fabio Cumbo (Third University of Rome, Italy) and Marzia A. Cremona (The Pennsylvania State University, USA).
+
+It implements a simplified version of the function *IWTomicsTest*, *plotTest* and *plotSummary* for *IWTomicsData* objects.
+The complete version can be found in the *R/Bioconductor* package *IWTomics* (see vignette_).
+
+.. _vignette: https://bioconductor.org/packages/release/bioc/vignettes/IWTomics/inst/doc/IWTomics.pdf
+  ]]></help>
+
+  <expand macro="citations" />
+
+</tool>