comparison plotwithscale.xml @ 0:1e677d6b1aaf draft

IWTomics v1.0 uploaded
author fabio
date Tue, 02 May 2017 11:05:18 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1e677d6b1aaf
1 <tool id="plotwithscale" name="IWTomics Plot with Threshold" version="0.1.0">
2 <description>on Test Scale</description>
3 <command interpreter="Rscript">
4 <![CDATA[
5 plotwithscale.R adjustedpvalue="${adjustedpvalue}" iwtomicsrespdf="${iwtomicsrespdf}" iwtomicssumpdf="${iwtomicssumpdf}"
6 iwtomicsrdata="${rdata}"
7 iwtomicstests="${testids}"
8 iwtomicsselectedfeatures="${featureids}"
9
10 #set test_subset = '"\\|"'.join( [ str( $e.test ) for $e in $scalesection.thresholdontestscale ] )
11 test_subset="${test_subset}"
12 #set feature_subset = '"\\|"'.join( [ str( $e.feature ) for $e in $scalesection.thresholdontestscale ] )
13 feature_subset="${feature_subset}"
14 #set scale_subset = '","'.join( [ str( $e.scale ) for $e in $scalesection.thresholdontestscale ] )
15 scale_subset="c(${scale_subset})"
16
17 testalpha="${plotres.alpha}"
18 average="${plotres.average}"
19 size="${plotres.size}"
20 plottype="'${plotres.conditionalplottype.plottype}'"
21 #if $plotres.conditionalplottype.plottype == 'boxplot':
22 #set probs = '","'.join( [ str( $p.prob ) for $p in $plotres.conditionalplottype.probabilitiessection.probabilities ] )
23 #if $probs != "":
24 probs="c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2},${probs})"
25 #else:
26 probs="c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2})"
27 #end if
28 #end if
29
30 groupby="'${plotsum.conditionalgroupby.groupby}'"
31 #if $plotsum.conditionalgroupby.groupby == "test":
32 summaryalpha="${plotsum.conditionalgroupby.testalphaplot}"
33 only_significant="${plotsum.conditionalgroupby.testonlysig}"
34 #elif $plotsum.conditionalgroupby.groupby == "feature":
35 summaryalpha="${plotsum.conditionalgroupby.featurealphaplot}"
36 only_significant="${plotsum.conditionalgroupby.featureonlysig}"
37 #end if
38
39 >& /dev/null
40 ]]>
41 <!--
42 to print the stack add the following line at the end of the command and enable the corresponding entry in output
43 2> "${stackerr}"
44 -->
45 </command>
46
47 <inputs>
48 <help>
49 ...
50 </help>
51
52 <!-- RData -->
53 <param format="rdata" name="rdata" type="data" label="Select IWTomicsData object with test results" help="File created by 'IWTomics Test and Plot'." />
54 <!-- test IDs -->
55 <param format="tabular" name="testids" type="data" label="Select test IDs" help="File created by 'IWTomics Test and Plot'." />
56 <!-- feature IDs -->
57 <param format="tabular" name="featureids" type="data" label="Select feature IDs" help="File created by 'IWTomics Test and Plot'." />
58
59 <!-- repeat threshold on test scale -->
60 <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.">
61 <repeat name="thresholdontestscale" title="Threshold on test scale" min="1">
62 <param name="test" type="data_column" data_ref="testids" numerical="False" label="Test ID" multiple="True" use_header_names="True" />
63 <param name="feature" type="data_column" data_ref="featureids" numerical="False" label="Feature ID" multiple="True" use_header_names="True" />
64 <param name="scale" type="integer" value="0" min="0" label="Scale" />
65 </repeat>
66 </section>
67
68 <!-- plot IWTomics results -->
69 <section name="plotres" title="Plot IWTomics test results" expanded="True">
70 <!-- alpha -->
71 <param name="alpha" size="3" type="float" value="0.05" min="0.0" max="1.0" label="Level of the test (alpha)" />
72 <!-- average -->
73 <param name="average" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Plot the mean curves" />
74 <!-- average -->
75 <param name="size" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Plot sample size in each position" />
76 <!-- conditional plot type -->
77 <conditional name="conditionalplottype">
78 <!-- plot type -->
79 <param name="plottype" type="select" label="Plot type">
80 <option value="boxplot">Pointwise quantile curves (boxplot)</option>
81 <option value="curves">Curves (aligned)</option>
82 </param>
83 <!-- conditional choice: plottype=boxplot -->
84 <when value="boxplot">
85 <section name="probabilitiessection" title="Probabilities" expanded="True" help="Probabilities corresponding to the quantile curves to be drawn.">
86 <param name="prob0" size="3" type="float" value="0.25" min="0.0" max="1.0" label="Probability" />
87 <param name="prob1" size="3" type="float" value="0.5" min="0.0" max="1.0" label="Probability" />
88 <param name="prob2" size="3" type="float" value="0.75" min="0.0" max="1.0" label="Probability" />
89 <repeat name="probabilities" title="Probabilities">
90 <param name="prob" size="3" type="float" value="0.5" min="0.0" max="1.0" label="Probability" />
91 </repeat>
92 </section>
93 </when>
94 </conditional>
95 </section>
96
97 <!-- summary plot -->
98 <section name="plotsum" title="Summary plot" expanded="True">
99 <!-- conditional group by -->
100 <conditional name="conditionalgroupby">
101 <!-- group by -->
102 <param name="groupby" type="select" label="Group by" help="How tests should be grouped.">
103 <option value="none">No plot</option>
104 <option value="test">Group by test</option>
105 <option value="feature">Group by feature</option>
106 </param>
107 <when value="test">
108 <param name="testalphaplot" size="3" type="float" value="0.05" min="0.0" max="1.0" label="Level of the test (alpha)" />
109 <param name="testonlysig" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Plot only significant tests" />
110 </when>
111 <when value="feature">
112 <param name="featurealphaplot" size="3" type="float" value="0.05" min="0.0" max="1.0" label="Level of the test (alpha)" />
113 <param name="featureonlysig" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Plot only significant tests" />
114 </when>
115 </conditional>
116 </section>
117 </inputs>
118
119 <outputs>
120 <!--<data format="txt" name="stackerr" label="iwtomics.testandplot.stackerr.txt" from_work_dir="iwtomics.testandplot.stackerr.txt" />-->
121 <data format="txt" name="adjustedpvalue" label="${tool.name} on ${on_string}: Adjusted p-value" from_work_dir="iwtomics.testandplot.adjustedpvalue.txt" />
122 <data format="pdf" name="iwtomicsrespdf" label="${tool.name} on ${on_string}: Plotted Test Results" from_work_dir="iwtomics.testandplot.iwtomicstestresults.pdf" />
123 <data format="pdf" name="iwtomicssumpdf" label="${tool.name} on ${on_string}: Summary Plot" from_work_dir="iwtomics.testandplot.summaryplot.pdf" />
124 </outputs>
125
126 <help>
127 This tool allows to select the scale for the Interval-Wise Testing results. In particular, it returns the p-value curves
128 for the different tests performed at the selected scale, and it creates a graphical representation of the
129 Interval-Wise Testing results and a summary plot (optional) at the selected scale.
130
131 -----
132
133 **Input files**
134
135 RData file with the IWTomicsData object with test results, tabular files with test IDs and feature IDs.
136 These files are created by the tool *IWTomics Test and Plot*.
137
138 -----
139
140 **Output**
141
142 The tool returns:
143
144 1. TXT file with an adjusted p-value curve for every test performed at the selected scale;
145 2. PDF file with the plotted test results;
146 3. PDF file with the summary plot.
147
148 -----
149
150 .. class:: infomark
151
152 **Notes**
153
154 This Galaxy tool has been developed by Fabio Cumbo (Third University of Rome, Italy) and Marzia A. Cremona (The Pennsylvania State University, USA).
155
156 It implements a simplified version of the function *IWTomicsTest*, *plotTest* and *plotSummary* for *IWTomicsData* objects.
157 The complete version can be found in the *R/Bioconductor* package *IWTomics* (see vignette_).
158
159 .. _vignette: https://bioconductor.org/packages/release/bioc/vignettes/IWTomics/inst/doc/IWTomics.pdf
160 </help>
161
162 <citations>
163 <citation type="bibtex">
164 @ARTICLE{
165 iwt-functional-data,
166 author = {A Pini and S. Vantini},
167 title = {Interval-Wise Testing for functional data},
168 journal = {Journal of Nonparametric Statistics},
169 year = {2017},
170 volume = {29},
171 number = {2},
172 pages = {407-424}
173 }
174 </citation>
175 <citation type="bibtex">
176 @MANUAL{
177 iwtomics,
178 author = {Cremona, Marzia A and Pini, Alessia and Chiaromonte, Francesca and Vantini, Simone},
179 title = {IWTomics: Interval-Wise Testing for Omics Data},
180 note = {R package version 0.99.12},
181 year = {2017}
182 }
183 </citation>
184 </citations>
185
186 <stdio>
187 <exit_code range="-1" source="both" level="fatal" description="Missing IWTomics package. Please be sure to have it installed before using this tool." />
188 <exit_code range="10" source="both" level="fatal" description="Wrong test ids." />
189 <exit_code range="20" source="both" level="fatal" description="Wrong feature ids." />
190 <exit_code range="30" source="both" level="fatal" description="Two scale thresholds selected for the same test and feature." />
191 <exit_code range="40" source="both" level="fatal" description="Scale threshold too high." />
192 <exit_code range="50" source="both" level="fatal" description="Group by 'test' but selected features with different resolution." />
193 <exit_code range="60" source="both" level="fatal" description="Summary plot error. Please try again." />
194 <regex match="Error" source="both" level="fatal" description="An error has occurred. Please try again." />
195 </stdio>
196
197 </tool>