Mercurial > repos > yhoogstrate > edger_with_design_matrix
comparison edgeR_Differential_Gene_Expression.xml @ 70:fb64bf85361d draft
Uploaded
author | yhoogstrate |
---|---|
date | Tue, 30 Sep 2014 10:47:33 -0400 |
parents | 1dc20e3e11df |
children | e75afef75c13 |
comparison
equal
deleted
inserted
replaced
69:1dc20e3e11df | 70:fb64bf85361d |
---|---|
83 > /dev/null | 83 > /dev/null |
84 #end if | 84 #end if |
85 | 85 |
86 2> stderr.txt ; | 86 2> stderr.txt ; |
87 | 87 |
88 #if $output_format_images == "png": | 88 #if $output_format_images.value == "png": |
89 echo "Converting PDF figures to PNG" | 89 echo "Converting PDF figures to PNG" ; |
90 | 90 |
91 convert $output_MDSplot "{$output_MDSplot}.png" ; | 91 #if $output_MDSplot: |
92 convert $output_BCVplot "{$output_BCVplot}.png" ; | 92 #set $output_MDSplot_tmp = str($output_MDSplot)+".png" |
93 convert $output_MAplot "{$output_MAplot}.png" ; | 93 |
94 convert $output_PValue_distribution_plot "{$output_PValue_distribution_plot}.png" ; | 94 convert $output_MDSplot $output_MDSplot_tmp ; |
95 convert $output_hierarchical_clustering_plot "{$output_hierarchical_clustering_plot}.png" ; | 95 mv $output_MDSplot_tmp $output_MDSplot ; |
96 convert $output_heatmap_plot "{$output_heatmap_plot}.png" ; | 96 #end if |
97 | 97 |
98 mv "{$output_MDSplot}.png" $output_MDSplot ; | 98 #if $output_BCVplot: |
99 mv "{$output_BCVplot}.png" $output_BCVplot ; | 99 #set $output_BCVplot_tmp = str($output_BCVplot)+".png" |
100 mv "{$output_MAplot}.png" $output_MAplot ; | 100 |
101 mv "{$output_PValue_distribution_plot}.png" $output_PValue_distribution_plot ; | 101 convert $output_BCVplot $output_BCVplot_tmp ; |
102 mv "{$output_hierarchical_clustering_plot}.png" $output_hierarchical_clustering_plot ; | 102 mv $output_BCVplot_tmp $output_BCVplot ; |
103 mv "{$output_heatmap_plot}.png" $output_heatmap_plot ; | 103 #end if |
104 | 104 |
105 mv "{$output_format_images}.png" $output_format_images ; | 105 #if $output_MAplot: |
106 #else: | 106 #set $output_MAplot_tmp = str($output_MAplot)+".png" |
107 echo "Format is already in $output_format_images" | 107 |
108 convert $output_MAplot $output_MAplot_tmp ; | |
109 mv $output_MAplot_tmp $output_MAplot ; | |
110 #end if | |
111 | |
112 #if $output_PValue_distribution_plot: | |
113 #set $output_PValue_distribution_plot_tmp = str($output_PValue_distribution_plot)+".png" | |
114 | |
115 convert $output_PValue_distribution_plot $output_PValue_distribution_plot_tmp ; | |
116 mv $output_PValue_distribution_plot_tmp $output_PValue_distribution_plot ; | |
117 #end if | |
118 | |
119 #if $output_hierarchical_clustering_plot: | |
120 #set $output_hierarchical_clustering_plot_tmp = str($output_hierarchical_clustering_plot)+".png" | |
121 | |
122 convert $output_hierarchical_clustering_plot $output_hierarchical_clustering_plot_tmp ; | |
123 mv $output_hierarchical_clustering_plot_tmp $output_hierarchical_clustering_plot ; | |
124 #end if | |
125 | |
126 #if $output_heatmap_plot: | |
127 #set $output_heatmap_plot_tmp = str($output_heatmap_plot)+".png" | |
128 | |
129 convert $output_heatmap_plot $output_heatmap_plot_tmp ; | |
130 mv $output_heatmap_plot_tmp $output_heatmap_plot ; | |
131 #end if | |
108 #end if | 132 #end if |
109 | 133 |
110 grep -v 'Calculating library sizes from column' stderr.txt > stderr2.txt ; rm stderr.txt ; mv stderr2.txt stderr.txt ; | 134 grep -v 'Calculating library sizes from column' stderr.txt > stderr2.txt ; rm stderr.txt ; mv stderr2.txt stderr.txt ; |
111 | 135 |
112 ## Locale error messages: | 136 ## Locale error messages: |
264 | 288 |
265 if(output_format_images == "pdf" || output_format_images == "png") { | 289 if(output_format_images == "pdf" || output_format_images == "png") { |
266 pdf(output_MDSplot) | 290 pdf(output_MDSplot) |
267 } else if(output_format_images == "svg") { | 291 } else if(output_format_images == "svg") { |
268 svg(output_MDSplot) | 292 svg(output_MDSplot) |
269 ##} else { | 293 } |
294 ## else { | |
270 ## png(output_MDSplot) | 295 ## png(output_MDSplot) |
271 ##} | 296 ##} |
272 | 297 |
273 diff_x <- abs(max(points\$x)-min(points\$x)) | 298 diff_x <- abs(max(points\$x)-min(points\$x)) |
274 diff_y <-(max(points\$y)-min(points\$y)) | 299 diff_y <-(max(points\$y)-min(points\$y)) |
285 | 310 |
286 if(output_format_images == "pdf" || output_format_images == "png") { | 311 if(output_format_images == "pdf" || output_format_images == "png") { |
287 pdf(output_BCVplot) | 312 pdf(output_BCVplot) |
288 } else if(output_format_images == "svg") { | 313 } else if(output_format_images == "svg") { |
289 svg(output_BCVplot) | 314 svg(output_BCVplot) |
290 ##} else { | 315 } |
316 ##else { | |
291 ## png(output_BCVplot) | 317 ## png(output_BCVplot) |
292 ##} | 318 ##} |
293 | 319 |
294 plotBCV(dge, cex=0.4, main="edgeR: Biological coefficient of variation (BCV) vs abundance") | 320 plotBCV(dge, cex=0.4, main="edgeR: Biological coefficient of variation (BCV) vs abundance") |
295 dev.off() | 321 dev.off() |
320 | 346 |
321 if(output_format_images == "pdf" || output_format_images == "png") { | 347 if(output_format_images == "pdf" || output_format_images == "png") { |
322 pdf(output_MAplot) | 348 pdf(output_MAplot) |
323 } else if(output_format_images == "svg") { | 349 } else if(output_format_images == "svg") { |
324 svg(output_MAplot) | 350 svg(output_MAplot) |
325 ##} else { | 351 } |
352 ##else { | |
326 ## png(output_MAplot) | 353 ## png(output_MAplot) |
327 ##} | 354 ##} |
328 | 355 |
329 with(etable, plot(logCPM, logFC, pch=20, main="edgeR: Fold change vs abundance")) | 356 with(etable, plot(logCPM, logFC, pch=20, main="edgeR: Fold change vs abundance")) |
330 with(subset(etable, FDR < fdr), points(logCPM, logFC, pch=20, col="red")) | 357 with(subset(etable, FDR < fdr), points(logCPM, logFC, pch=20, col="red")) |
337 | 364 |
338 if(output_format_images == "pdf" || output_format_images == "png") { | 365 if(output_format_images == "pdf" || output_format_images == "png") { |
339 pdf(output_PValue_distribution_plot) | 366 pdf(output_PValue_distribution_plot) |
340 } else if(output_format_images == "svg") { | 367 } else if(output_format_images == "svg") { |
341 svg(output_PValue_distribution_plot) | 368 svg(output_PValue_distribution_plot) |
342 ##} else { | 369 } |
370 ##else { | |
343 ## png(output_PValue_distribution_plot) | 371 ## png(output_PValue_distribution_plot) |
344 ##} | 372 ##} |
345 | 373 |
346 expressed_genes <- subset(etable, PValue < 0.99) | 374 expressed_genes <- subset(etable, PValue < 0.99) |
347 h <- hist(expressed_genes\$PValue,breaks=nrow(expressed_genes)/15,main="Binned P-Values (< 0.99)") | 375 h <- hist(expressed_genes\$PValue,breaks=nrow(expressed_genes)/15,main="Binned P-Values (< 0.99)") |
363 | 391 |
364 if(output_format_images == "pdf" || output_format_images == "png") { | 392 if(output_format_images == "pdf" || output_format_images == "png") { |
365 pdf(output_heatmap_plot,width=10.5) | 393 pdf(output_heatmap_plot,width=10.5) |
366 } else if(output_format_images == "svg") { | 394 } else if(output_format_images == "svg") { |
367 svg(output_heatmap_plot,width=10.5) | 395 svg(output_heatmap_plot,width=10.5) |
368 ##} else { | 396 } |
397 ## else { | |
369 ## png(output_heatmap_plot,width=10.5) | 398 ## png(output_heatmap_plot,width=10.5) |
370 ##} | 399 ##} |
371 | 400 |
372 etable2 <- topTags(lrt, n=100)\$table | 401 etable2 <- topTags(lrt, n=100)\$table |
373 order <- rownames(etable2) | 402 order <- rownames(etable2) |