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