annotate plotwithscale.xml @ 39:844a71b6043a draft

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