Mercurial > repos > yhoogstrate > edger_with_design_matrix
comparison edgeR_Differential_Gene_Expression.xml @ 55:8c63794c3d3e draft
Uploaded
author | yhoogstrate |
---|---|
date | Mon, 25 Aug 2014 07:36:52 -0400 |
parents | b89788eead3c |
children | 25b54356ecfb |
comparison
equal
deleted
inserted
replaced
54:cef8f2a174fc | 55:8c63794c3d3e |
---|---|
70 #if $output_RData_obj: | 70 #if $output_RData_obj: |
71 $output_RData_obj | 71 $output_RData_obj |
72 #else: | 72 #else: |
73 /dev/null | 73 /dev/null |
74 #end if | 74 #end if |
75 ' | 75 |
76 $output_format_images | |
77 ' | |
76 #if $output_R: | 78 #if $output_R: |
77 > $output_R | 79 > $output_R |
78 #else: | 80 #else: |
79 > /dev/null | 81 > /dev/null |
80 #end if | 82 #end if |
114 <option value="make_output_heatmap_plot">Heatmap</option> | 116 <option value="make_output_heatmap_plot">Heatmap</option> |
115 | 117 |
116 <option value="make_output_R_stdout">R stdout</option> | 118 <option value="make_output_R_stdout">R stdout</option> |
117 <option value="make_output_RData_obj">R Data object</option> | 119 <option value="make_output_RData_obj">R Data object</option> |
118 </param> | 120 </param> |
121 | |
122 <param name="output_format_images" type="select" label="Output format of images" display="radio"> | |
123 <option value="png">Portable network graphics (.png)</option> | |
124 <option value="pdf">Portable document format (.pdf)</option> | |
125 <option value="svg">Scalable vector graphics (.svg)</option> | |
126 </param> | |
119 </inputs> | 127 </inputs> |
120 | 128 |
121 <configfiles> | 129 <configfiles> |
122 <configfile name="R_script"> | 130 <configfile name="R_script"> |
123 library(limma,quietly=TRUE) ## enable quietly to avoid unnecessaity stderr dumping | 131 library(limma,quietly=TRUE) ## enable quietly to avoid unnecessaity stderr dumping |
144 output_MAplot = args[11] | 152 output_MAplot = args[11] |
145 output_PValue_distribution_plot = args[12] | 153 output_PValue_distribution_plot = args[12] |
146 output_hierarchical_clustering_plot = args[13] | 154 output_hierarchical_clustering_plot = args[13] |
147 output_heatmap_plot = args[14] | 155 output_heatmap_plot = args[14] |
148 output_RData_obj = args[15] | 156 output_RData_obj = args[15] |
157 output_format_images = args[16] | |
149 | 158 |
150 | 159 |
151 library(edgeR) | 160 library(edgeR) |
152 ##raw_data <- read.delim(designmatrix,header=T,stringsAsFactors=T) | 161 ##raw_data <- read.delim(designmatrix,header=T,stringsAsFactors=T) |
153 ## Obtain read-counts | 162 ## Obtain read-counts |
227 write("Creating MDS plot",stdout()) | 236 write("Creating MDS plot",stdout()) |
228 ##points <- plotMDS(dge,method="bcv",labels=rep("",nrow(dge\$samples)))# Get coordinates of unflexible plot | 237 ##points <- plotMDS(dge,method="bcv",labels=rep("",nrow(dge\$samples)))# Get coordinates of unflexible plot |
229 points <- plotMDS.DGEList(dge,labels=rep("",nrow(dge\$samples)))# Get coordinates of unflexible plot | 238 points <- plotMDS.DGEList(dge,labels=rep("",nrow(dge\$samples)))# Get coordinates of unflexible plot |
230 dev.off()# Kill it | 239 dev.off()# Kill it |
231 | 240 |
232 pdf(output_MDSplot) | 241 if(output_format_images == "pdf") { |
242 capabilities() | |
243 ##x11() | |
244 pdf(output_MDSplot) | |
245 } else if(output_format_images == "svg") { | |
246 svg(output_MDSplot) | |
247 } else { | |
248 png(output_MDSplot) | |
249 } | |
250 | |
233 diff_x <- abs(max(points\$x)-min(points\$x)) | 251 diff_x <- abs(max(points\$x)-min(points\$x)) |
234 diff_y <-(max(points\$y)-min(points\$y)) | 252 diff_y <-(max(points\$y)-min(points\$y)) |
235 plot(c(min(points\$x),max(points\$x) + 0.45 * diff_x), c(min(points\$y) - 0.05 * diff_y,max(points\$y) + 0.05 * diff_y), main="edgeR MDS Plot",type="n", xlab="BCV distance 1", ylab="BCV distance 2") | 253 plot(c(min(points\$x),max(points\$x) + 0.45 * diff_x), c(min(points\$y) - 0.05 * diff_y,max(points\$y) + 0.05 * diff_y), main="edgeR MDS Plot",type="n", xlab="BCV distance 1", ylab="BCV distance 2") |
236 points(points\$x,points\$y,pch=20) | 254 points(points\$x,points\$y,pch=20) |
237 text(points\$x, points\$y,rownames(dge\$samples),cex=0.7,col="gray",pos=4) | 255 text(points\$x, points\$y,rownames(dge\$samples),cex=0.7,col="gray",pos=4) |
322 | 340 |
323 <data format="tabular" name="output_raw_counts" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - raw counts"> | 341 <data format="tabular" name="output_raw_counts" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - raw counts"> |
324 <filter>outputs and ("make_output_raw_counts" in outputs)</filter> | 342 <filter>outputs and ("make_output_raw_counts" in outputs)</filter> |
325 </data> | 343 </data> |
326 | 344 |
327 <data format="pdf" name="output_MDSplot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - MDS-plot"> | 345 <data format="${output_format_images}" name="output_MDSplot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - MDS-plot"> |
328 <filter>outputs and ("make_output_MDSplot" in outputs)</filter> | 346 <filter>outputs and ("make_output_MDSplot" in outputs)</filter> |
329 </data> | 347 </data> |
330 | 348 |
331 <data format="pdf" name="output_BCVplot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - BCV-plot"> | 349 <data format="${output_format_images}" name="output_BCVplot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - BCV-plot"> |
332 <filter>outputs and ("make_output_BCVplot" in outputs)</filter> | 350 <filter>outputs and ("make_output_BCVplot" in outputs)</filter> |
333 </data> | 351 </data> |
334 | 352 |
335 <data format="pdf" name="output_MAplot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - MA-plot"> | 353 <data format="${output_format_images}" name="output_MAplot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - MA-plot"> |
336 <filter>outputs and ("make_output_MAplot" in outputs)</filter> | 354 <filter>outputs and ("make_output_MAplot" in outputs)</filter> |
337 </data> | 355 </data> |
338 | 356 |
339 <data format="pdf" name="output_PValue_distribution_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - P-Value distribution"> | 357 <data format="${output_format_images}" name="output_PValue_distribution_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - P-Value distribution"> |
340 <filter>outputs and ("make_output_PValue_distribution_plot" in outputs)</filter> | 358 <filter>outputs and ("make_output_PValue_distribution_plot" in outputs)</filter> |
341 </data> | 359 </data> |
342 | 360 |
343 <data format="pdf" name="output_hierarchical_clustering_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - Hierarchical custering"> | 361 <data format="${output_format_images}" name="output_hierarchical_clustering_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - Hierarchical custering"> |
344 <filter>outputs and ("make_output_hierarchical_clustering_plot" in outputs)</filter> | 362 <filter>outputs and ("make_output_hierarchical_clustering_plot" in outputs)</filter> |
345 </data> | 363 </data> |
346 | 364 |
347 <data format="pdf" name="output_heatmap_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - Heatmap"> | 365 <data format="${output_format_images}" name="output_heatmap_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - Heatmap"> |
348 <filter>outputs and ("make_output_heatmap_plot" in outputs)</filter> | 366 <filter>outputs and ("make_output_heatmap_plot" in outputs)</filter> |
349 </data> | 367 </data> |
350 | 368 |
351 <data format="RData" name="output_RData_obj" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - R data object"> | 369 <data format="RData" name="output_RData_obj" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - R data object"> |
352 <filter>outputs and ("make_output_RData_obj" in outputs)</filter> | 370 <filter>outputs and ("make_output_RData_obj" in outputs)</filter> |