annotate iwtomics-1.0/plotwithscale.xml @ 82:8e397b62df4c draft

Uploaded 20171006
author fabio
date Fri, 06 Oct 2017 11:03:56 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
82
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
1 <tool id="iwtomics_plotwithscale" name="IWTomics Plot with Threshold" version="@VERSION@.0">
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
2 <description>on Test Scale</description>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
3 <macros>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
4 <import>macros.xml</import>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
5 </macros>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
6 <expand macro="requirements" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
7
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
8 <command detect_errors="exit_code">
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
9 <![CDATA[
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
10 Rscript '$__tool_directory__/plotwithscale.R' adjustedpvalue='${adjustedpvalue}' iwtomicsrespdf='${iwtomicsrespdf}' iwtomicssumpdf='${iwtomicssumpdf}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
11 iwtomicsrdata='${rdata}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
12 iwtomicstests='${testids}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
13 iwtomicsselectedfeatures='${featureids}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
14
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
15 #set test_subset = '|'.join( [ str( $e.test ) for $e in $scalesection.thresholdontestscale ] )
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
16 test_subset='${test_subset}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
17 #set feature_subset = '|'.join( [ str( $e.feature ) for $e in $scalesection.thresholdontestscale ] )
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
18 feature_subset='${feature_subset}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
19 #set scale_subset = ','.join( [ str( $e.scale ) for $e in $scalesection.thresholdontestscale ] )
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
20 scale_subset='c(${scale_subset})'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
21
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
22 testalpha='${plotres.alpha}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
23 average='${plotres.average}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
24 size='${plotres.size}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
25 plottype="'${plotres.conditionalplottype.plottype}'"
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
26 #if $plotres.conditionalplottype.plottype == 'boxplot':
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
27 #set probs = ','.join( [ str( $p.prob ) for $p in $plotres.conditionalplottype.probabilitiessection.probabilities ] )
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
28 #if $probs != "":
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
29 probs='c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2},${probs})'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
30 #else:
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
31 probs='c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2})'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
32 #end if
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
33 #end if
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
34
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
35 groupby="'${plotsum.conditionalgroupby.groupby}'"
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
36 #if $plotsum.conditionalgroupby.groupby == "test":
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
37 summaryalpha='${plotsum.conditionalgroupby.testalphaplot}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
38 only_significant='${plotsum.conditionalgroupby.testonlysig}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
39 #elif $plotsum.conditionalgroupby.groupby == "feature":
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
40 summaryalpha='${plotsum.conditionalgroupby.featurealphaplot}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
41 only_significant='${plotsum.conditionalgroupby.featureonlysig}'
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
42 #end if
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
43 ]]>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
44 </command>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
45
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
46 <inputs>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
47 <!-- RData -->
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
48 <param format="rdata" name="rdata" type="data" label="Select IWTomicsData object with test results" help="File created by 'IWTomics Test and Plot'." />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
49 <!-- test IDs -->
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
50 <param format="tabular" name="testids" type="data" label="Select test IDs" help="File created by 'IWTomics Test and Plot'." />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
51 <!-- feature IDs -->
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
52 <param format="tabular" name="featureids" type="data" label="Select feature IDs" help="File created by 'IWTomics Test and Plot'." />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
53
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
54 <!-- repeat threshold on test scale -->
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
55 <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.">
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
56 <repeat name="thresholdontestscale" title="Threshold on test scale" min="1">
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
57 <param name="test" type="data_column" data_ref="testids" numerical="False" label="Test ID" multiple="True" use_header_names="True" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
58 <param name="feature" type="data_column" data_ref="featureids" numerical="False" label="Feature ID" multiple="True" use_header_names="True" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
59 <param name="scale" type="integer" value="0" min="0" label="Scale" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
60 </repeat>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
61 </section>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
62
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
63 <!-- plot IWTomics results -->
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
64 <section name="plotres" title="Plot IWTomics test results" expanded="True">
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
65 <!-- alpha -->
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
66 <param name="alpha" size="3" type="float" value="0.05" min="0.0" max="1.0" label="Level of the test (alpha)" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
67 <expand macro="plot-params" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
68 </section>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
69
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
70 <!-- summary plot -->
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
71 <expand macro="plot-sum" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
72 </inputs>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
73
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
74 <outputs>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
75 <data format="txt" name="adjustedpvalue" label="${tool.name} on ${on_string}: Adjusted p-value" from_work_dir="iwtomics.plotwithscale.adjustedpvalue.txt" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
76 <data format="pdf" name="iwtomicsrespdf" label="${tool.name} on ${on_string}: Plotted Test Results" from_work_dir="iwtomics.plotwithscale.iwtomicstestresults.pdf" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
77 <data format="pdf" name="iwtomicssumpdf" label="${tool.name} on ${on_string}: Summary Plot" from_work_dir="iwtomics.plotwithscale.summaryplot.pdf" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
78 </outputs>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
79
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
80 <tests>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
81 <test>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
82 <param name="rdata" value="output_testandplot/iwtomics.testandplot.RData" ftype="rdata" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
83 <param name="testids" value="output_testandplot/iwtomics.testandplot.tests.txt" ftype="tabular" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
84 <param name="featureids" value="output_testandplot/iwtomics.testandplot.selectedfeatures.txt" ftype="tabular" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
85 <repeat name="thresholdontestscale">
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
86 <param name="test" value="1" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
87 <param name="feature" value="1" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
88 <param name="scale" value="10" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
89 </repeat>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
90 <repeat name="thresholdontestscale">
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
91 <param name="test" value="1,2,3" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
92 <param name="feature" value="2" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
93 <param name="scale" value="20" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
94 </repeat>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
95 <param name="alpha" value="0.05" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
96 <param name="average" value="TRUE" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
97 <param name="size" value="TRUE" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
98 <param name="plottype" value="boxplot" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
99 <param name="prob0" value="0.25" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
100 <param name="prob1" value="0.5" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
101 <param name="prob2" value="0.75" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
102 <param name="groupby" value="feature" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
103 <param name="featurealphaplot" value="0.05" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
104 <param name="featureonlysig" value="TRUE" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
105 <output name="adjustedpvalue" file="output_plotwithscale/iwtomics.plotwithscale.adjustedpvalue.txt" compare="sim_size" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
106 <output name="iwtomicsrespdf" file="output_plotwithscale/iwtomics.plotwithscale.iwtomicstestresults.pdf" compare="sim_size" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
107 <output name="iwtomicssumpdf" file="output_plotwithscale/iwtomics.plotwithscale.summaryplot.pdf" compare="sim_size" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
108 </test>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
109 </tests>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
110
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
111 <help><![CDATA[
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
112 This tool allows to select the scale for the Interval-Wise Testing results. In particular, it returns the p-value curves
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
113 for the different tests performed at the selected scale, and it creates a graphical representation of the
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
114 Interval-Wise Testing results and a summary plot (optional) at the selected scale.
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
115
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
116 -----
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
117
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
118 **Input files**
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
119
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
120 RData file with the IWTomicsData object with test results, tabular files with test IDs and feature IDs.
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
121 These files are created by the tool *IWTomics Test and Plot*.
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
122
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
123 -----
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
124
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
125 **Output**
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
126
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
127 The tool returns:
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
128
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
129 1. TXT file with an adjusted p-value curve for every test performed at the selected scale;
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
130 2. PDF file with the plotted test results;
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
131 3. PDF file with the summary plot.
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
132
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
133 -----
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
134
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
135 .. class:: infomark
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
136
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
137 **Notes**
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
138
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
139 This Galaxy tool has been developed by Fabio Cumbo (Third University of Rome, Italy) and Marzia A. Cremona (The Pennsylvania State University, USA).
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
140
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
141 It implements a simplified version of the function *IWTomicsTest*, *plotTest* and *plotSummary* for *IWTomicsData* objects.
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
142 The complete version can be found in the *R/Bioconductor* package *IWTomics* (see vignette_).
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
143
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
144 .. _vignette: https://bioconductor.org/packages/release/bioc/vignettes/IWTomics/inst/doc/IWTomics.pdf
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
145 ]]></help>
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
146
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
147 <expand macro="citations" />
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
148
8e397b62df4c Uploaded 20171006
fabio
parents:
diff changeset
149 </tool>