annotate plotwithscale.xml @ 80:5893ad34d0ac draft

Uploaded 20170620
author fabio
date Tue, 20 Jun 2017 13:14:31 -0400
parents 7dcc25a1a062
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
58
7a806a3aeda1 Uploaded 20170608
fabio
parents: 56
diff changeset
1 <tool id="iwtomics_plotwithscale" name="IWTomics Plot with Threshold" version="@VERSION@.0">
18
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>
80
5893ad34d0ac Uploaded 20170620
fabio
parents: 76
diff changeset
6 <expand macro="requirements" />
74
2bb6b44093ba Uploaded 20170619
fabio
parents: 72
diff changeset
7
2bb6b44093ba Uploaded 20170619
fabio
parents: 72
diff changeset
8 <command detect_errors="exit_code">
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
9 <![CDATA[
70
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
10 Rscript '$__tool_directory__/plotwithscale.R' adjustedpvalue='${adjustedpvalue}' iwtomicsrespdf='${iwtomicsrespdf}' iwtomicssumpdf='${iwtomicssumpdf}'
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
11 iwtomicsrdata='${rdata}'
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
12 iwtomicstests='${testids}'
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
13 iwtomicsselectedfeatures='${featureids}'
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
14
72
a3bfaf944f73 Uploaded 20170614
fabio
parents: 70
diff changeset
15 #set test_subset = '|'.join( [ str( $e.test ) for $e in $scalesection.thresholdontestscale ] )
70
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
16 test_subset='${test_subset}'
72
a3bfaf944f73 Uploaded 20170614
fabio
parents: 70
diff changeset
17 #set feature_subset = '|'.join( [ str( $e.feature ) for $e in $scalesection.thresholdontestscale ] )
70
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
18 feature_subset='${feature_subset}'
72
a3bfaf944f73 Uploaded 20170614
fabio
parents: 70
diff changeset
19 #set scale_subset = ','.join( [ str( $e.scale ) for $e in $scalesection.thresholdontestscale ] )
70
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
20 scale_subset='c(${scale_subset})'
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
21
70
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
22 testalpha='${plotres.alpha}'
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
23 average='${plotres.average}'
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
24 size='${plotres.size}'
72
a3bfaf944f73 Uploaded 20170614
fabio
parents: 70
diff changeset
25 plottype="'${plotres.conditionalplottype.plottype}'"
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
26 #if $plotres.conditionalplottype.plottype == 'boxplot':
72
a3bfaf944f73 Uploaded 20170614
fabio
parents: 70
diff changeset
27 #set probs = ','.join( [ str( $p.prob ) for $p in $plotres.conditionalplottype.probabilitiessection.probabilities ] )
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
28 #if $probs != "":
70
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
29 probs='c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2},${probs})'
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
30 #else:
70
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
31 probs='c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2})'
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
32 #end if
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
33 #end if
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
34
72
a3bfaf944f73 Uploaded 20170614
fabio
parents: 70
diff changeset
35 groupby="'${plotsum.conditionalgroupby.groupby}'"
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
36 #if $plotsum.conditionalgroupby.groupby == "test":
70
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
37 summaryalpha='${plotsum.conditionalgroupby.testalphaplot}'
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
38 only_significant='${plotsum.conditionalgroupby.testonlysig}'
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
39 #elif $plotsum.conditionalgroupby.groupby == "feature":
70
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
40 summaryalpha='${plotsum.conditionalgroupby.featurealphaplot}'
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
41 only_significant='${plotsum.conditionalgroupby.featureonlysig}'
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
42 #end if
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
43 ]]>
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
44 </command>
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
45
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
46 <inputs>
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
47 <!-- RData -->
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
48 <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
49 <!-- test IDs -->
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
50 <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
51 <!-- feature IDs -->
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
52 <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
53
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
54 <!-- repeat threshold on test scale -->
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
55 <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
56 <repeat name="thresholdontestscale" title="Threshold on test scale" min="1">
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
57 <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
58 <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
59 <param name="scale" type="integer" value="0" min="0" label="Scale" />
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
60 </repeat>
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
61 </section>
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
62
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
63 <!-- plot IWTomics results -->
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
64 <section name="plotres" title="Plot IWTomics test results" expanded="True">
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
65 <!-- alpha -->
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
66 <param name="alpha" size="3" type="float" value="0.05" min="0.0" max="1.0" label="Level of the test (alpha)" />
76
7dcc25a1a062 Uploaded 20170620
fabio
parents: 74
diff changeset
67 <expand macro="plot-params" />
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
68 </section>
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
69
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
70 <!-- summary plot -->
76
7dcc25a1a062 Uploaded 20170620
fabio
parents: 74
diff changeset
71 <expand macro="plot-sum" />
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
72 </inputs>
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
73
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
74 <outputs>
56
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
75 <data format="txt" name="adjustedpvalue" label="${tool.name} on ${on_string}: Adjusted p-value" from_work_dir="iwtomics.plotwithscale.adjustedpvalue.txt" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
76 <data format="pdf" name="iwtomicsrespdf" label="${tool.name} on ${on_string}: Plotted Test Results" from_work_dir="iwtomics.plotwithscale.iwtomicstestresults.pdf" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
77 <data format="pdf" name="iwtomicssumpdf" label="${tool.name} on ${on_string}: Summary Plot" from_work_dir="iwtomics.plotwithscale.summaryplot.pdf" />
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
78 </outputs>
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
79
56
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
80 <tests>
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
81 <test>
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
82 <param name="rdata" value="output_testandplot/iwtomics.testandplot.RData" ftype="rdata" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
83 <param name="testids" value="output_testandplot/iwtomics.testandplot.tests.txt" ftype="tabular" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
84 <param name="featureids" value="output_testandplot/iwtomics.testandplot.selectedfeatures.txt" ftype="tabular" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
85 <repeat name="thresholdontestscale">
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
86 <param name="test" value="1" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
87 <param name="feature" value="1" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
88 <param name="scale" value="10" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
89 </repeat>
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
90 <repeat name="thresholdontestscale">
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
91 <param name="test" value="1,2,3" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
92 <param name="feature" value="2" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
93 <param name="scale" value="20" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
94 </repeat>
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
95 <param name="alpha" value="0.05" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
96 <param name="average" value="TRUE" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
97 <param name="size" value="TRUE" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
98 <param name="plottype" value="boxplot" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
99 <param name="prob0" value="0.25" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
100 <param name="prob1" value="0.5" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
101 <param name="prob2" value="0.75" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
102 <param name="groupby" value="feature" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
103 <param name="featurealphaplot" value="0.05" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
104 <param name="featureonlysig" value="TRUE" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
105 <output name="adjustedpvalue" file="output_plotwithscale/iwtomics.plotwithscale.adjustedpvalue.txt" compare="sim_size" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
106 <output name="iwtomicsrespdf" file="output_plotwithscale/iwtomics.plotwithscale.iwtomicstestresults.pdf" compare="sim_size" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
107 <output name="iwtomicssumpdf" file="output_plotwithscale/iwtomics.plotwithscale.summaryplot.pdf" compare="sim_size" />
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
108 </test>
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
109 </tests>
9ceb3ffcd817 Uploaded 20170608
fabio
parents: 54
diff changeset
110
68
971bb414cc4f Uploaded 20170609
fabio
parents: 66
diff changeset
111 <help><![CDATA[
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
112 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
113 for the different tests performed at the selected scale, and it creates a graphical representation of the
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
114 Interval-Wise Testing results and a summary plot (optional) at the selected scale.
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
115
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
116 -----
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
117
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
118 **Input files**
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
119
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
120 RData file with the IWTomicsData object with test results, tabular files with test IDs and feature IDs.
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
121 These files are created by the tool *IWTomics Test and Plot*.
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
122
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
123 -----
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
124
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
125 **Output**
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
126
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
127 The tool returns:
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
128
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
129 1. TXT file with an adjusted p-value curve for every test performed at the selected scale;
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
130 2. PDF file with the plotted test results;
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
131 3. PDF file with the summary plot.
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
132
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
133 -----
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
134
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
135 .. class:: infomark
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
136
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
137 **Notes**
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
138
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
139 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
140
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
141 It implements a simplified version of the function *IWTomicsTest*, *plotTest* and *plotSummary* for *IWTomicsData* objects.
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
142 The complete version can be found in the *R/Bioconductor* package *IWTomics* (see vignette_).
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
143
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
144 .. _vignette: https://bioconductor.org/packages/release/bioc/vignettes/IWTomics/inst/doc/IWTomics.pdf
68
971bb414cc4f Uploaded 20170609
fabio
parents: 66
diff changeset
145 ]]></help>
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
146
70
39e7294c66e1 Uploaded 20170614
fabio
parents: 68
diff changeset
147 <expand macro="citations" />
18
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
148
565118df598a Uploaded 20170531
fabio
parents:
diff changeset
149 </tool>