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>
|
76
|
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 </command>
|
|
45
|
|
46 <inputs>
|
|
47 <!-- RData -->
|
|
48 <param format="rdata" name="rdata" type="data" label="Select IWTomicsData object with test results" help="File created by 'IWTomics Test and Plot'." />
|
|
49 <!-- test IDs -->
|
|
50 <param format="tabular" name="testids" type="data" label="Select test IDs" help="File created by 'IWTomics Test and Plot'." />
|
|
51 <!-- feature IDs -->
|
|
52 <param format="tabular" name="featureids" type="data" label="Select feature IDs" help="File created by 'IWTomics Test and Plot'." />
|
|
53
|
|
54 <!-- repeat threshold on test scale -->
|
|
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.">
|
|
56 <repeat name="thresholdontestscale" title="Threshold on test scale" min="1">
|
|
57 <param name="test" type="data_column" data_ref="testids" numerical="False" label="Test ID" multiple="True" use_header_names="True" />
|
|
58 <param name="feature" type="data_column" data_ref="featureids" numerical="False" label="Feature ID" multiple="True" use_header_names="True" />
|
|
59 <param name="scale" type="integer" value="0" min="0" label="Scale" />
|
|
60 </repeat>
|
|
61 </section>
|
|
62
|
|
63 <!-- plot IWTomics results -->
|
|
64 <section name="plotres" title="Plot IWTomics test results" expanded="True">
|
|
65 <!-- alpha -->
|
|
66 <param name="alpha" size="3" type="float" value="0.05" min="0.0" max="1.0" label="Level of the test (alpha)" />
|
76
|
67 <expand macro="plot-params" />
|
18
|
68 </section>
|
|
69
|
|
70 <!-- summary plot -->
|
76
|
71 <expand macro="plot-sum" />
|
18
|
72 </inputs>
|
|
73
|
|
74 <outputs>
|
56
|
75 <data format="txt" name="adjustedpvalue" label="${tool.name} on ${on_string}: Adjusted p-value" from_work_dir="iwtomics.plotwithscale.adjustedpvalue.txt" />
|
|
76 <data format="pdf" name="iwtomicsrespdf" label="${tool.name} on ${on_string}: Plotted Test Results" from_work_dir="iwtomics.plotwithscale.iwtomicstestresults.pdf" />
|
|
77 <data format="pdf" name="iwtomicssumpdf" label="${tool.name} on ${on_string}: Summary Plot" from_work_dir="iwtomics.plotwithscale.summaryplot.pdf" />
|
18
|
78 </outputs>
|
|
79
|
56
|
80 <tests>
|
|
81 <test>
|
|
82 <param name="rdata" value="output_testandplot/iwtomics.testandplot.RData" ftype="rdata" />
|
|
83 <param name="testids" value="output_testandplot/iwtomics.testandplot.tests.txt" ftype="tabular" />
|
|
84 <param name="featureids" value="output_testandplot/iwtomics.testandplot.selectedfeatures.txt" ftype="tabular" />
|
|
85 <repeat name="thresholdontestscale">
|
|
86 <param name="test" value="1" />
|
|
87 <param name="feature" value="1" />
|
|
88 <param name="scale" value="10" />
|
|
89 </repeat>
|
|
90 <repeat name="thresholdontestscale">
|
|
91 <param name="test" value="1,2,3" />
|
|
92 <param name="feature" value="2" />
|
|
93 <param name="scale" value="20" />
|
|
94 </repeat>
|
|
95 <param name="alpha" value="0.05" />
|
|
96 <param name="average" value="TRUE" />
|
|
97 <param name="size" value="TRUE" />
|
|
98 <param name="plottype" value="boxplot" />
|
|
99 <param name="prob0" value="0.25" />
|
|
100 <param name="prob1" value="0.5" />
|
|
101 <param name="prob2" value="0.75" />
|
|
102 <param name="groupby" value="feature" />
|
|
103 <param name="featurealphaplot" value="0.05" />
|
|
104 <param name="featureonlysig" value="TRUE" />
|
|
105 <output name="adjustedpvalue" file="output_plotwithscale/iwtomics.plotwithscale.adjustedpvalue.txt" compare="sim_size" />
|
|
106 <output name="iwtomicsrespdf" file="output_plotwithscale/iwtomics.plotwithscale.iwtomicstestresults.pdf" compare="sim_size" />
|
|
107 <output name="iwtomicssumpdf" file="output_plotwithscale/iwtomics.plotwithscale.summaryplot.pdf" compare="sim_size" />
|
|
108 </test>
|
|
109 </tests>
|
|
110
|
68
|
111 <help><![CDATA[
|
18
|
112 This tool allows to select the scale for the Interval-Wise Testing results. In particular, it returns the p-value curves
|
|
113 for the different tests performed at the selected scale, and it creates a graphical representation of the
|
|
114 Interval-Wise Testing results and a summary plot (optional) at the selected scale.
|
|
115
|
|
116 -----
|
|
117
|
|
118 **Input files**
|
|
119
|
|
120 RData file with the IWTomicsData object with test results, tabular files with test IDs and feature IDs.
|
|
121 These files are created by the tool *IWTomics Test and Plot*.
|
|
122
|
|
123 -----
|
|
124
|
|
125 **Output**
|
|
126
|
|
127 The tool returns:
|
|
128
|
|
129 1. TXT file with an adjusted p-value curve for every test performed at the selected scale;
|
|
130 2. PDF file with the plotted test results;
|
|
131 3. PDF file with the summary plot.
|
|
132
|
|
133 -----
|
|
134
|
|
135 .. class:: infomark
|
|
136
|
|
137 **Notes**
|
|
138
|
|
139 This Galaxy tool has been developed by Fabio Cumbo (Third University of Rome, Italy) and Marzia A. Cremona (The Pennsylvania State University, USA).
|
|
140
|
|
141 It implements a simplified version of the function *IWTomicsTest*, *plotTest* and *plotSummary* for *IWTomicsData* objects.
|
|
142 The complete version can be found in the *R/Bioconductor* package *IWTomics* (see vignette_).
|
|
143
|
|
144 .. _vignette: https://bioconductor.org/packages/release/bioc/vignettes/IWTomics/inst/doc/IWTomics.pdf
|
68
|
145 ]]></help>
|
18
|
146
|
70
|
147 <expand macro="citations" />
|
18
|
148
|
|
149 </tool>
|