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