Mercurial > repos > cjav > cummerbund
annotate cummerbund_wrapper.xml @ 3:f4e2d805434c
adds R requirement
author | Carlos Borroto <carlos.borroto@gmail.com> |
---|---|
date | Tue, 14 Feb 2012 13:28:04 -0500 |
parents | 5de9fff7ccf7 |
children | a9f216cf02f5 |
rev | line source |
---|---|
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
1 <tool id="cummerbund" name="cummeRbund" version="0.0.2"> |
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
2 |
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
3 <description>R package designed to aid and simplify the task of analyzing Cufflinks RNA-Seq output</description> |
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
4 |
0 | 5 <command interpreter="python"> |
6 cummerbund_wrapper.py | |
7 --r-script ${script_file} | |
8 --html-report-from-directory "${output_html}" "${output_html.files_path}" | |
9 </command> | |
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
10 |
0 | 11 <inputs> |
12 <conditional name="backend_database_source"> | |
13 <param name="backend_database_selector" type="select" label="Will you select a backend database file from the history or do you want to build a new one using cuffdiff output?"> | |
14 <option value="history" selected="true">Use backend database from the history</option> | |
15 <option value="cuffdiff_output">Build backend database using cuffdiff output</option> | |
16 </param> | |
17 <when value="cuffdiff_output"> | |
18 <param format="tabular" name="isoforms_fpkm_tracking" type="data" label="Transcript FPKM tracking"/> | |
19 <param format="tabular" name="isoforms_exp" type="data" label="Transcript differential expression testing"/> | |
20 <param format="tabular" name="genes_fpkm_tracking" type="data" label="Gene FPKM tracking"/> | |
21 <param format="tabular" name="genes_exp" type="data" label="Gene differential expression testing"/> | |
22 <param format="tabular" name="tss_groups_fpkm_tracking" type="data" label="TSS groups FPKM tracking"/> | |
23 <param format="tabular" name="tss_groups_exp" type="data" label="TSS groups differential expression testing"/> | |
24 <param format="tabular" name="cds_fpkm_tracking" type="data" label="CDS FPKM tracking"/> | |
25 <param format="tabular" name="cds_exp_diff" type="data" label="CDS FPKM differential expression testing"/> | |
26 <param format="tabular" name="cds_diff" type="data" label="CDS overloading diffential expression testing"/> | |
27 <param format="tabular" name="promoters_diff" type="data" label="Promoters differential expression testing"/> | |
28 <param format="tabular" name="splicing_diff" type="data" label="Splicing differential expression testing"/> | |
29 <param name="rebuild" type="hidden" value="TRUE"/> | |
30 </when> | |
31 <when value="history"> | |
32 <param name="input_database" type="data" format="data" label="Select backend database (sqlite)"/> | |
33 </when> | |
34 </conditional> | |
35 <repeat name="plots" title="Plots"> | |
36 <param name="width" type="text" value="1280" label="The width of the image"/> | |
37 <param name="height" type="text" value="960" label="The height of the image"/> | |
38 <conditional name="plot"> | |
39 <param name="type" type="select" label="Plot type"> | |
40 <option value="density" selected="true">Density</option> | |
41 <option value="boxplot">Boxplot</option> | |
42 <option value="scatter">Scatter</option> | |
43 <option value="volcano">Volcano</option> | |
44 <option value="heatmap">Heatmap</option> | |
45 <option value="cluster">Cluster</option> | |
46 <option value="expressionplot">Expression Plot</option> | |
47 <option value="expressionbarplot">Expression Bar Plot</option> | |
48 </param> | |
49 <when value="density"> | |
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
50 <param name="log_mode" type="boolean" truevalue="T" falsevalue="F" checked="True" label="Apply log10 transformation on FPKM values?"/> |
0 | 51 </when> |
52 <when value="boxplot"> | |
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
53 <param name="log_mode" type="boolean" truevalue="T" falsevalue="F" checked="True" label="Apply log10 transformation on FPKM values?"/> |
0 | 54 </when> |
55 <when value="scatter"> | |
56 <param name="x" type="text" label="Sample name for x axis"/> | |
57 <param name="y" type="text" label="Sample name for y axis"/> | |
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
58 <param name="log_mode" type="boolean" truevalue="T" falsevalue="F" checked="True" label="Apply log10 transformation on FPKM values?"/> |
0 | 59 <param name="smooth" type="boolean" truevalue="T" falsevalue="F" checked="True" label="Add a smooth-fit regression line"/> |
60 <conditional name="multiple_genes"> | |
61 <param name="multiple_genes_selector" type="boolean" truevalue="T" falsevalue="F" checked="False" label="Limit plot to a group of genes?"/> | |
62 <when value="T"> | |
63 <param name="features" type="select" label="Expression levels to plot?"> | |
64 <option value="gene" selected="true">Genes</option> | |
65 <option value="isoforms">Isoforms</option> | |
66 <option value="tss">TSS</option> | |
67 <option value="cds">CDS</option> | |
68 </param> | |
69 <repeat name="genes" title="Genes"> | |
70 <param name="gene_id" type="text" label="Gene ID"/> | |
71 </repeat> | |
72 </when> | |
73 </conditional> | |
74 </when> | |
75 <when value="volcano"> | |
76 <param name="x" type="text" label="First sample name for comparison"/> | |
77 <param name="y" type="text" label="Second sample name for comparison"/> | |
78 <conditional name="multiple_genes"> | |
79 <param name="multiple_genes_selector" type="boolean" truevalue="T" falsevalue="F" checked="False" label="Limit plot to a group of genes?"/> | |
80 <when value="T"> | |
81 <param name="features" type="select" label="Expression levels to plot?"> | |
82 <option value="gene" selected="true">Genes</option> | |
83 <option value="isoforms">Isoforms</option> | |
84 <option value="tss">TSS</option> | |
85 <option value="cds">CDS</option> | |
86 </param> | |
87 <repeat name="genes" title="Genes"> | |
88 <param name="gene_id" type="text" label="Gene ID"/> | |
89 </repeat> | |
90 </when> | |
91 </conditional> | |
92 </when> | |
93 <when value="heatmap"> | |
94 <param name="features" type="select" label="Expression levels to plot?"> | |
95 <option value="gene" selected="true">Genes</option> | |
96 <option value="isoforms">Isoforms</option> | |
97 <option value="tss">TSS</option> | |
98 <option value="cds">CDS</option> | |
99 </param> | |
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
100 <repeat name="genes" title="Genes"> |
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
101 <param name="gene_id" type="text" label="Gene ID"/> |
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
102 </repeat> |
0 | 103 <param name="clustering" type="select" label="Cluster by"> |
104 <option value="row">Row</option> | |
105 <option value="column">Column</option> | |
106 <option value="both" selected="true">Both</option> | |
107 <option value="none">None</option> | |
108 </param> | |
109 <param name="labcol" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Display column labels?"/> | |
110 <param name="labrow" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Display column labels?"/> | |
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
111 <param name="log_mode" type="boolean" truevalue="T" falsevalue="F" checked="True" label="Apply log10 transformation on FPKM values?"/> |
0 | 112 <param name="border" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="False" label="Draw border around plot?"/> |
113 </when> | |
114 <when value="cluster"> | |
115 <param name="features" type="select" label="Expression levels to plot?"> | |
116 <option value="gene" selected="true">Genes</option> | |
117 <option value="isoforms">Isoforms</option> | |
118 <option value="tss">TSS</option> | |
119 <option value="cds">CDS</option> | |
120 </param> | |
121 <repeat name="genes" title="Genes"> | |
122 <param name="gene_id" type="text" label="Gene ID"/> | |
123 </repeat> | |
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
124 <param name="k" type="text" label="Number of pre-defined clusters to attempt to find."/> |
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
125 <param name="iter_max" type="text" value="100" label="Max iterations"/> |
0 | 126 </when> |
127 <when value="expressionplot"> | |
128 <param name="features" type="select" label="Expression levels to plot?"> | |
129 <option value="gene" selected="true">Genes</option> | |
130 <option value="isoforms">Isoforms</option> | |
131 <option value="tss">TSS</option> | |
132 <option value="cds">CDS</option> | |
133 </param> | |
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
134 <param name="gene_id" type="text" label="Gene ID"/> |
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
135 <param name="log_mode" type="boolean" truevalue="T" falsevalue="F" checked="True" label="Apply log10 transformation on FPKM values?"/> |
0 | 136 <param name="draw_summary" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="False" label="Draw a 'summary' line with mean FPKM |
137 values for each condition?"/> | |
138 <param name="show_error_bars" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Draw error bars?"/> | |
139 </when> | |
140 <when value="expressionbarplot"> | |
141 <param name="features" type="select" label="Expression levels to plot?"> | |
142 <option value="gene" selected="true">Genes</option> | |
143 <option value="isoforms">Isoforms</option> | |
144 <option value="tss">TSS</option> | |
145 <option value="cds">CDS</option> | |
146 </param> | |
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
147 <param name="gene_id" type="text" label="Gene ID"/> |
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
148 <param name="log_mode" type="boolean" truevalue="T" falsevalue="F" checked="True" label="Apply log10 transformation on FPKM values?"/> |
0 | 149 <param name="show_error_bars" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Draw error bars?"/> |
150 </when> | |
151 </conditional> | |
152 </repeat> | |
153 </inputs> | |
2
5de9fff7ccf7
fix for warnings on empty conditional inputs
Carlos Borroto <carlos.borroto@gmail.com>
parents:
0
diff
changeset
|
154 |
0 | 155 <outputs> |
156 <data format="data" name="output_database" label="${tool.name} on ${on_string}: Database File (sqlite)"> | |
157 <filter>backend_database_source['backend_database_selector'] == "cuffdiff_output"</filter> | |
158 </data> | |
159 <data format="html" name="output_html" label="${tool.name} on ${on_string} (HTML)"/> | |
160 </outputs> | |
161 | |
3 | 162 <requirements> |
163 <requirement type="binary">R</requirement> | |
164 </requirements> | |
165 | |
0 | 166 <!--> |
167 <tests> | |
168 <test> | |
169 <param name="" value=""/> | |
170 <output name="" file=""/> | |
171 </test> | |
172 </tests> | |
173 --> | |
174 <configfiles> | |
175 <configfile name="script_file"> | |
176 | |
177 ## Feature Selection ## | |
178 get_features <- function(myGenes, f="gene") { | |
179 if (f == "isoforms") | |
180 return(isoforms(myGenes)) | |
181 else if (f == "tss") | |
182 return(TSS(myGenes)) | |
183 else if (f == "cds") | |
184 return(CDS(myGenes)) | |
185 else | |
186 return(myGenes) | |
187 } | |
188 | |
189 ## Main Function ## | |
190 | |
191 ## Load cummeRbund library | |
192 library("cummeRbund") | |
193 | |
194 ## Initialize cuff object | |
195 cuff <- readCufflinks(dir = "", | |
196 #if $backend_database_source.backend_database_selector == "cuffdiff_output": | |
197 dbFile = "${output_database}", | |
198 geneFPKM = "${genes_fpkm_tracking}", | |
199 geneDiff = "${genes_exp}", | |
200 isoformFPKM = "${isoforms_fpkm_tracking}", | |
201 isoformDiff = "${isoforms_exp}", | |
202 TSSFPKM = "${tss_groups_fpkm_tracking}", | |
203 TSSDiff = "${tss_groups_exp}", | |
204 CDSFPKM = "${cds_fpkm_tracking}", | |
205 CDSExpDiff = "${cds_exp_diff}", | |
206 CDSDiff = "${cds_diff}", | |
207 promoterFile = "${promoters_diff}", | |
208 splicingFile = "${splicing_diff}", | |
209 rebuild = T) | |
210 #else: | |
211 dbFile = "${backend_database_source.input_database}", | |
212 rebuild = F) | |
213 #end if | |
214 | |
215 #for $i, $p in enumerate($plots, start=1): | |
216 #set $filename = "plot%02d-%s.png" % ($i, $p.plot['type']) | |
217 png(filename = "${filename}", width = ${p.width}, height = ${p.height}) | |
218 | |
219 ## Density plot ## | |
220 #if $p.plot['type'] == "density": | |
221 csDensity(genes(cuff)) | |
222 devname = dev.off() | |
223 | |
224 ## Boxplot ## | |
225 #elif $p.plot['type'] == "boxplot": | |
226 csBoxplot(genes(cuff)) | |
227 devname = dev.off() | |
228 | |
229 ## Scatter ## | |
230 #elif $p.plot['type'] == "scatter": | |
231 #if $p.plot.multiple_genes['multiple_genes_selector']: | |
232 myGeneIds <- c() | |
233 #for $g in $p.plot.multiple_genes['genes']: | |
234 myGeneIds <- c(myGeneIds, "$g['gene_id']") | |
235 #end for | |
236 myGenes <- getGenes(cuff, myGeneIds) | |
237 csScatter(get_features(myGenes, "$p.plot.multiple_genes['features']"), "${p.plot.x}", "${p.plot.y}", smooth=${p.plot.smooth}) | |
238 #else | |
239 csScatter(genes(cuff), "${p.plot.x}", "${p.plot.y}", smooth=${p.plot.smooth}) | |
240 #end if | |
241 devname = dev.off() | |
242 | |
243 ## Volcano ## | |
244 #elif $p.plot['type'] == "volcano": | |
245 #if $p.plot.multiple_genes['multiple_genes_selector']: | |
246 myGeneIds <- c() | |
247 #for $g in $p.plot.multiple_genes['genes']: | |
248 myGeneIds <- c(myGeneIds, "$g['gene_id']") | |
249 #end for | |
250 myGenes <- getGenes(cuff, myGeneIds) | |
251 csVolcano(get_features(myGenes, "$p.plot.multiple_genes['features']"), "${p.plot.x}", "${p.plot.y}") | |
252 #else | |
253 csVolcano(genes(cuff), "${p.plot.x}", "${p.plot.y}") | |
254 #end if | |
255 devname = dev.off() | |
256 | |
257 ## Heatmap ## | |
258 #elif $p.plot['type'] == "heatmap": | |
259 myGeneIds <- c() | |
260 #for $g in $p.plot.genes: | |
261 myGeneIds <- c(myGeneIds, "$g['gene_id']") | |
262 #end for | |
263 myGenes <- getGenes(cuff, myGeneIds) | |
264 csHeatmap(get_features(myGenes, "${p.plot.features}"), clustering="${p.plot.clustering}", labCol="${p.plot.labcol}", labRow="${p.plot.labrow}", border="${p.plot.border}") | |
265 devname = dev.off() | |
266 | |
267 ## Cluster ## | |
268 #elif $p.plot['type'] == "cluster": | |
269 myGeneIds <- c() | |
270 #for $g in $p.plot.genes: | |
271 myGeneIds <- c(myGeneIds, "$g['gene_id']") | |
272 #end for | |
273 myGenes <- getGenes(cuff, myGeneIds) | |
274 csCluster(get_features(myGenes, "${p.plot.features}"), k=${p.plot.k}, iter.max="${p.plot.iter_max}") | |
275 devname = dev.off() | |
276 | |
277 ## Expression Plot ## | |
278 #elif $p.plot['type'] == "expressionplot": | |
279 myGeneId <- "$p.plot.gene_id" | |
280 myGenes <- getGenes(cuff, myGeneId) | |
281 expressionPlot(get_features(myGenes, "${p.plot.features}"), drawSummary=${p.plot.draw_summary}, iter.max="${p.plot.show_error_bars}") | |
282 devname = dev.off() | |
283 | |
284 ## Expression Bar Plot ## | |
285 #elif $p.plot['type'] == "expressionbarplot": | |
286 myGeneId <- "$p.plot.gene_id" | |
287 myGenes <- getGenes(cuff, myGeneId) | |
288 expressionBarplot(get_features(myGenes, "${p.plot.features}"), iter.max="${p.plot.show_error_bars}") | |
289 devname = dev.off() | |
290 #end if | |
291 | |
292 #end for | |
293 </configfile> | |
294 </configfiles> | |
295 | |
296 <help> | |
297 This tool allows for persistent storage, access, exploration, and manipulation of Cufflinks high-throughput sequencing data. In addition, provides numerous plotting functions for commonly used visualizations. | |
298 </help> | |
299 | |
300 </tool> |