58
|
1 <tool id="iwtomics_testandplot" name="IWTomics Test" version="@VERSION@.0">
|
18
|
2 <description>and Plot</description>
|
|
3 <macros>
|
|
4 <import>macros.xml</import>
|
|
5 </macros>
|
76
|
6 <!--<expand macro="requirements" />-->
|
18
|
7
|
74
|
8 <command detect_errors="exit_code">
|
18
|
9 <![CDATA[
|
70
|
10 Rscript '$__tool_directory__/testandplot.R' adjustedpvaluematrix='${adjustedpvaluematrix}' iwtomicsrespdf='${iwtomicsrespdf}' iwtomicssumpdf='${iwtomicssumpdf}' iwtomicsrdata='${iwtomicsrdata}' iwtomicstests='${iwtomicstests}' iwtomicsselectedfeatures='${iwtomicsselectedfeatures}'
|
|
11 regionids='${regionids}'
|
|
12 featureids='${featureids}'
|
|
13 rdatafile='${rdata}'
|
18
|
14
|
72
|
15 #set region1 = ','.join( [ str( $r.region0 ) for $r in $regionssection.regions ] )
|
|
16 #set region2 = ','.join( [ str( $r.region1 ) for $r in $regionssection.regions ] )
|
70
|
17 region1='c(${region1})'
|
|
18 region2='c(${region2})'
|
18
|
19
|
70
|
20 features_subset='c(${featureslist})'
|
18
|
21
|
72
|
22 statistics="'${conditionalstatistics.statistics}'"
|
18
|
23 #if $conditionalstatistics.statistics == "quantile":
|
72
|
24 #set probabilities = ','.join( [ str( $p.qprob ) for $p in $conditionalstatistics.quantilesection.qprobabilities ] )
|
70
|
25 testprobs='c(${probabilities})'
|
18
|
26 #end if
|
|
27
|
70
|
28 B='${permutations}'
|
18
|
29
|
70
|
30 testalpha='${plotres.alpha}'
|
|
31 average='${plotres.average}'
|
|
32 size='${plotres.size}'
|
72
|
33 plottype="'${plotres.conditionalplottype.plottype}'"
|
|
34 #if $plotres.conditionalplottype.plottype == "boxplot":
|
|
35 #set probs = ','.join( [ str( $p.prob ) for $p in $plotres.conditionalplottype.probabilitiessection.probabilities ] )
|
18
|
36 #if $probs != "":
|
70
|
37 probs='c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2},${probs})'
|
18
|
38 #else:
|
70
|
39 probs='c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2})'
|
18
|
40 #end if
|
|
41 #end if
|
|
42
|
72
|
43 groupby="'${plotsum.conditionalgroupby.groupby}'"
|
18
|
44 #if $plotsum.conditionalgroupby.groupby == "test":
|
70
|
45 summaryalpha='${plotsum.conditionalgroupby.testalphaplot}'
|
|
46 only_significant='${plotsum.conditionalgroupby.testonlysig}'
|
18
|
47 #elif $plotsum.conditionalgroupby.groupby == "feature":
|
70
|
48 summaryalpha='${plotsum.conditionalgroupby.featurealphaplot}'
|
|
49 only_significant='${plotsum.conditionalgroupby.featureonlysig}'
|
18
|
50 #end if
|
|
51 ]]>
|
|
52 </command>
|
|
53
|
|
54 <inputs>
|
|
55 <!-- RData -->
|
|
56 <param format="rdata" name="rdata" type="data" label="Select IWTomicsData object" help="File created by 'IWTomics Load Smooth and Plot'." />
|
|
57 <!-- region IDs -->
|
|
58 <param format="tabular" name="regionids" type="data" label="Select region dataset IDs" help="File created by 'IWTomics Load Smooth and Plot'." />
|
|
59 <!-- feature IDs -->
|
|
60 <param format="tabular" name="featureids" type="data" label="Select feature IDs" help="File created by 'IWTomics Load Smooth and Plot'." />
|
|
61
|
|
62 <!-- repeat region ids -->
|
|
63 <section name="regionssection" title="Select regions for Interval-Wise Testing" expanded="True" help="IDs of the region datasets to be tested.">
|
|
64 <repeat name="regions" title="Two-sample test" min="1">
|
|
65 <param name="region0" type="data_column" data_ref="regionids" numerical="False" label="Region 1" multiple="False" use_header_names="True" />
|
|
66 <param name="region1" type="data_column" data_ref="regionids" numerical="False" label="Region 2" multiple="False" use_header_names="True" />
|
|
67 </repeat>
|
|
68 </section>
|
|
69
|
|
70 <!-- feature ids list -->
|
|
71 <param name="featureslist" type="data_column" data_ref="featureids" numerical="False" label="Select features" multiple="True" use_header_names="True" help="IDs of the features to be tested." />
|
|
72
|
|
73 <!-- conditional statistics -->
|
|
74 <conditional name="conditionalstatistics">
|
|
75 <!-- statistics -->
|
|
76 <param name="statistics" type="select" label="Test statistics">
|
|
77 <option value="mean">Mean difference</option>
|
|
78 <option value="median">Median difference</option>
|
|
79 <option value="variance">Variance ratio</option>
|
|
80 <option value="quantile">Quantile difference(s)</option>
|
|
81 </param>
|
|
82 <!-- conditional choice: statistics=quantile -->
|
|
83 <when value="quantile">
|
|
84 <section name="quantilesection" title="Probabilities" expanded="True" help="Probabilities corresponding to the quantiles in test statistics.">
|
|
85 <repeat name="qprobabilities" title="Probabilities" min="1">
|
|
86 <param name="qprob" size="4" type="float" value="0.5" min="0.0" max="1.0" label="Probability" />
|
|
87 </repeat>
|
|
88 </section>
|
|
89 </when>
|
|
90 </conditional>
|
|
91
|
|
92 <!-- permutations -->
|
|
93 <param name="permutations" type="integer" value="1000" min="1" label="Number of permutations" />
|
|
94
|
|
95 <!-- plot IWTomics results -->
|
|
96 <section name="plotres" title="Plot IWTomics test results" expanded="True">
|
|
97 <!-- alpha -->
|
|
98 <param name="alpha" size="3" type="float" value="0.05" min="0.0" max="1.0" label="Level of the test (alpha)" />
|
76
|
99 <expand macro="plot-params" />
|
18
|
100 </section>
|
|
101
|
|
102 <!-- summary plot -->
|
76
|
103 <expand macro="plot-sum" />
|
18
|
104 </inputs>
|
|
105
|
|
106 <outputs>
|
|
107 <data format="txt" name="adjustedpvaluematrix" label="${tool.name} on ${on_string}: Adjusted p-value Matrix" from_work_dir="iwtomics.testandplot.adjustedpvalue.matrix.txt" />
|
|
108 <data format="pdf" name="iwtomicsrespdf" label="${tool.name} on ${on_string}: Plotted Test Results" from_work_dir="iwtomics.testandplot.iwtomicstestresults.pdf" />
|
|
109 <data format="pdf" name="iwtomicssumpdf" label="${tool.name} on ${on_string}: Summary Plot" from_work_dir="iwtomics.testandplot.summaryplot.pdf" />
|
|
110 <data format="rdata" name="iwtomicsrdata" label="${tool.name} on ${on_string}: IWTomicsData Object with Test Results" from_work_dir="iwtomics.testandplot.RData" />
|
|
111 <data format="tabular" name="iwtomicstests" label="${tool.name} on ${on_string}: Test IDs" from_work_dir="iwtomics.testandplot.tests.txt" />
|
|
112 <data format="tabular" name="iwtomicsselectedfeatures" label="${tool.name} on ${on_string}: Feature IDs" from_work_dir="iwtomics.testandplot.selectedfeatures.txt" />
|
|
113 </outputs>
|
|
114
|
56
|
115 <tests>
|
|
116 <test>
|
|
117 <param name="rdata" value="output_loadandplot/iwtomics.loadandplot.RData" ftype="rdata" />
|
|
118 <param name="regionids" value="output_loadandplot/iwtomics.loadandplot.regions.txt" ftype="tabular" />
|
|
119 <param name="featureids" value="output_loadandplot/iwtomics.loadandplot.features.txt" ftype="tabular" />
|
|
120 <repeat name="regions">
|
|
121 <param name="region0" value="2" />
|
|
122 <param name="region1" value="1" />
|
|
123 </repeat>
|
|
124 <repeat name="regions">
|
|
125 <param name="region0" value="3" />
|
|
126 <param name="region1" value="1" />
|
|
127 </repeat>
|
|
128 <repeat name="regions">
|
|
129 <param name="region0" value="4" />
|
|
130 <param name="region1" value="1" />
|
|
131 </repeat>
|
|
132 <param name="featureslist" value="1,2" />
|
|
133 <param name="statistics" value="mean" />
|
|
134 <param name="permutations" value="1000" />
|
|
135 <param name="alpha" value="0.05" />
|
|
136 <param name="average" value="TRUE" />
|
|
137 <param name="size" value="TRUE" />
|
|
138 <param name="plottype" value="boxplot" />
|
|
139 <param name="prob0" value="0.25" />
|
|
140 <param name="prob1" value="0.5" />
|
|
141 <param name="prob2" value="0.75" />
|
|
142 <param name="groupby" value="feature" />
|
|
143 <param name="featurealphaplot" value="0.05" />
|
|
144 <param name="featureonlysig" value="TRUE" />
|
|
145 <output name="adjustedpvaluematrix" file="output_testandplot/iwtomics.testandplot.adjustedpvalue.matrix.txt" compare="sim_size" />
|
|
146 <output name="iwtomicsrespdf" file="output_testandplot/iwtomics.testandplot.iwtomicstestresults.pdf" compare="sim_size" />
|
|
147 <output name="iwtomicssumpdf" file="output_testandplot/iwtomics.testandplot.summaryplot.pdf" compare="sim_size" />
|
|
148 <output name="iwtomicsrdata" file="output_testandplot/iwtomics.testandplot.RData" compare="sim_size" />
|
|
149 <output name="iwtomicstests" file="output_testandplot/iwtomics.testandplot.tests.txt" />
|
|
150 <output name="iwtomicsselectedfeatures" file="output_testandplot/iwtomics.testandplot.selectedfeatures.txt" />
|
|
151 </test>
|
|
152 </tests>
|
|
153
|
68
|
154 <help><![CDATA[
|
18
|
155 This tool statistically evaluates differences in genomic features between groups of regions along the genome.
|
|
156 In particular, it implements the Interval-Wise Testing for omics data, an extended version of the Interval-Wise
|
|
157 Testing for functional data presented in Pini and Vantini (2017). It allows to perform multiple two sample permutation
|
|
158 tests between pairs of region datasets, on several features. It returns the adjusted p-value curves for every test
|
|
159 and all possible scales. Moreover, it creates a graphical representation of the Interval-Wise Testing results
|
|
160 and a summary plot (optional) with p-values at the maximum scale. The tool *IWTomics Plot with Threshold on Test Scale*
|
|
161 permits to select the scale to be used in the plots.
|
|
162
|
|
163 -----
|
|
164
|
|
165 **Input files**
|
|
166
|
|
167 RData file with the IWTomicsData object, tabular files with region dataset IDs and feature IDs.
|
|
168 These files are created by the tool *IWTomics Load Smooth and Plot*.
|
|
169
|
|
170 -----
|
|
171
|
|
172 **Output**
|
|
173
|
|
174 The tool returns:
|
|
175
|
|
176 1. TXT file with an adjusted p-value matrix for every test performed. Each matrix contains a p-value curve (row) for every scale considered in the test;
|
|
177 2. PDF file with the plotted test results;
|
|
178 3. PDF file with the summary plot;
|
|
179 4. RData with the IWTomicsData object with the test results;
|
|
180 5. Test identifiers;
|
|
181 6. Feature identifiers.
|
|
182
|
|
183 4-6 can be used as input of the tool *IWTomics Plot with Threshold on Test Scale*
|
|
184
|
|
185 -----
|
|
186
|
|
187 .. class:: infomark
|
|
188
|
|
189 **Notes**
|
|
190
|
|
191 This Galaxy tool has been developed by Fabio Cumbo (Third University of Rome, Italy) and Marzia A. Cremona (The Pennsylvania State University, USA).
|
|
192
|
|
193 It implements a simplified version of the function *IWTomicsTest*, *plotTest* and *plotSummary* for *IWTomicsData* objects.
|
|
194 The complete version can be found in the *R/Bioconductor* package *IWTomics* (see vignette_).
|
|
195
|
|
196 .. _vignette: https://bioconductor.org/packages/release/bioc/vignettes/IWTomics/inst/doc/IWTomics.pdf
|
68
|
197 ]]></help>
|
18
|
198
|
70
|
199 <expand macro="citations" />
|
18
|
200
|
|
201 </tool>
|