Mercurial > repos > yhoogstrate > edger_with_design_matrix
changeset 60:c5cc1b24f7d8 draft
Uploaded
author | yhoogstrate |
---|---|
date | Mon, 25 Aug 2014 08:23:15 -0400 |
parents | f20dc31afd5e |
children | 415b1fabdd4a |
files | edgeR_Differential_Gene_Expression.xml |
diffstat | 1 files changed, 71 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/edgeR_Differential_Gene_Expression.xml Mon Aug 25 08:14:33 2014 -0400 +++ b/edgeR_Differential_Gene_Expression.xml Mon Aug 25 08:23:15 2014 -0400 @@ -239,8 +239,6 @@ dev.off()# Kill it if(output_format_images == "pdf") { - capabilities() - ##x11() pdf(output_MDSplot) } else if(output_format_images == "svg") { svg(output_MDSplot) @@ -260,7 +258,15 @@ if(output_BCVplot != "/dev/null") { write("Creating Biological coefficient of variation plot",stdout()) - pdf(output_BCVplot) + + if(output_format_images == "pdf") { + pdf(output_BCVplot) + } else if(output_format_images == "svg") { + svg(output_BCVplot) + } else { + png(output_BCVplot) + } + plotBCV(dge, cex=0.4, main="edgeR: Biological coefficient of variation (BCV) vs abundance") dev.off() } @@ -281,14 +287,21 @@ ## todo EXPORT FPKM write.table(file=output_raw_counts,dge\$counts,sep="\t",row.names=TRUE,col.names=NA) - if(output_MAplot != "/dev/null" || output_PValue_distribution_plot != "/dev/null") { etable <- topTags(lrt, n=nrow(dge))\$table etable <- etable[order(etable\$FDR), ] if(output_MAplot != "/dev/null") { write("Creating MA plot...",stdout()) - pdf(output_MAplot) + + if(output_format_images == "pdf") { + pdf(output_MAplot) + } else if(output_format_images == "svg") { + svg(output_MAplot) + } else { + png(output_MAplot) + } + with(etable, plot(logCPM, logFC, pch=20, main="edgeR: Fold change vs abundance")) with(subset(etable, FDR < fdr), points(logCPM, logFC, pch=20, col="red")) abline(h=c(-1,1), col="blue") @@ -297,7 +310,15 @@ if(output_PValue_distribution_plot != "/dev/null") { write("Creating P-value distribution plot...",stdout()) - pdf(output_PValue_distribution_plot) + + if(output_format_images == "pdf") { + pdf(output_PValue_distribution_plot) + } else if(output_format_images == "svg") { + svg(output_PValue_distribution_plot) + } else { + png(output_PValue_distribution_plot) + } + expressed_genes <- subset(etable, PValue < 0.99) h <- hist(expressed_genes\$PValue,breaks=nrow(expressed_genes)/15,main="Binned P-Values (< 0.99)") center <- sum(h\$counts) / length(h\$counts) @@ -315,7 +336,15 @@ } if(output_heatmap_plot != "/dev/null") { - pdf(output_heatmap_plot,width=10.5) + + if(output_format_images == "pdf") { + pdf(output_heatmap_plot,width=10.5) + } else if(output_format_images == "svg") { + svg(output_heatmap_plot,width=10.5) + } else { + png(output_heatmap_plot,width=10.5) + } + etable2 <- topTags(lrt, n=100)\$table order <- rownames(etable2) cpm_sub <- cpm(dge,normalized.lib.sizes=TRUE,log=TRUE)[as.numeric(order),] @@ -352,24 +381,54 @@ </change_format> </data> - <data format="${output_format_images}" name="output_BCVplot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - BCV-plot"> + <data format="png" name="output_BCVplot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - BCV-plot"> <filter>outputs and ("make_output_BCVplot" in outputs)</filter> + + <change_format> + <when input="output_format_images" value="png" format="png" /> + <when input="output_format_images" value="pdf" format="pdf" /> + <when input="output_format_images" value="svg" format="svg" /> + </change_format> </data> - <data format="${output_format_images}" name="output_MAplot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - MA-plot"> + <data format="png" name="output_MAplot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - MA-plot"> <filter>outputs and ("make_output_MAplot" in outputs)</filter> + + <change_format> + <when input="output_format_images" value="png" format="png" /> + <when input="output_format_images" value="pdf" format="pdf" /> + <when input="output_format_images" value="svg" format="svg" /> + </change_format> </data> - <data format="${output_format_images}" name="output_PValue_distribution_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - P-Value distribution"> + <data format="png" name="output_PValue_distribution_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - P-Value distribution"> <filter>outputs and ("make_output_PValue_distribution_plot" in outputs)</filter> + + <change_format> + <when input="output_format_images" value="png" format="png" /> + <when input="output_format_images" value="pdf" format="pdf" /> + <when input="output_format_images" value="svg" format="svg" /> + </change_format> </data> - <data format="${output_format_images}" name="output_hierarchical_clustering_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - Hierarchical custering"> + <data format="png" name="output_hierarchical_clustering_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - Hierarchical custering"> <filter>outputs and ("make_output_hierarchical_clustering_plot" in outputs)</filter> + + <change_format> + <when input="output_format_images" value="png" format="png" /> + <when input="output_format_images" value="pdf" format="pdf" /> + <when input="output_format_images" value="svg" format="svg" /> + </change_format> </data> - <data format="${output_format_images}" name="output_heatmap_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - Heatmap"> + <data format="png" name="output_heatmap_plot" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - Heatmap"> <filter>outputs and ("make_output_heatmap_plot" in outputs)</filter> + + <change_format> + <when input="output_format_images" value="png" format="png" /> + <when input="output_format_images" value="pdf" format="pdf" /> + <when input="output_format_images" value="svg" format="svg" /> + </change_format> </data> <data format="RData" name="output_RData_obj" label="edgeR DGE on ${design_matrix.hid}: ${design_matrix.name} - R data object">