annotate testandplot.xml @ 92:ef627fa13c64 draft default tip

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