Limma: 2 venn diagrams on single page
1
0
Entering edit mode
Daren Tan ▴ 120
@daren-tan-3309
Last seen 10.2 years ago
I would like to place 2 venn diagrams generated by limma on single page. However they are very squeezy and there are much empty space above and below them. The output is attached to this post. I would like to remove the empty space, so that the venn diagrams are as large as possible while retaining their aspect ratio. I tried reducing oma to 0 but unable to get what I want. library("limma") Y <- matrix(rnorm(100*6),100,6) Y[1:10,3:4] <- Y[1:10,3:4]+3 Y[1:20,5:6] <- Y[1:20,5:6]+3 design <- cbind(1,c(0,0,1,1,0,0),c(0,0,0,0,1,1)) fit <- eBayes(lmFit(Y,design)) results <- decideTests(fit) a <- vennCounts(results) pdf("test.pdf", paper="a4") par(oma=rep(0.5, 4), mfrow=c(2,1), pty="m") vennDiagram(m, include=c("up","down"), counts.col=c("red","green"), mar=rep(1,4), main="test") vennDiagram(m, include=c("both"), counts.col=c("blue"), mar=rep(1,4), main="test") dev.off() > sessionInfo() R version 2.8.1 (2008-12-22) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] tools stats graphics grDevices utils datasets methods base other attached packages: [1] limma_2.16.4 venn_1.6 pvclust_1.2-1 org.Hs.eg.db_2.2.6 KEGG.db_2.2.5 hgu133a.db_2.2.5 RSQLite_0.7-1 [8] DBI_0.2-4 AnnotationDbi_1.4.3 Biobase_2.2.2 -------------- next part -------------- A non-text attachment was scrubbed... Name: test.pdf Type: application/pdf Size: 37669 bytes Desc: not available URL: <https: stat.ethz.ch="" pipermail="" bioconductor="" attachments="" 20090320="" 6eaf4b59="" attachment.pdf="">
hgu133a limma hgu133a limma • 1.8k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States
I would use a combination of layout() and the width and height arguments to pdf(). If I run the workable portion of your code, I get pretty reasonable results with this: > pdf("test.pdf", paper="a4", height=11, width=7) > layout(matrix(1:2, ncol=1)) > vennDiagram(a) > vennDiagram(a) > dev.off() Best, Jim Daren Tan wrote: > I would like to place 2 venn diagrams generated by limma on single > page. However they are very squeezy and there are much empty space > above and below them. The output is attached to this post. I would > like to remove the empty space, so that the venn diagrams are as large > as possible while retaining their aspect ratio. I tried reducing oma > to 0 but unable to get what I want. > > library("limma") > Y <- matrix(rnorm(100*6),100,6) > Y[1:10,3:4] <- Y[1:10,3:4]+3 > Y[1:20,5:6] <- Y[1:20,5:6]+3 > design <- cbind(1,c(0,0,1,1,0,0),c(0,0,0,0,1,1)) > fit <- eBayes(lmFit(Y,design)) > results <- decideTests(fit) > a <- vennCounts(results) > pdf("test.pdf", paper="a4") > par(oma=rep(0.5, 4), mfrow=c(2,1), pty="m") > vennDiagram(m, include=c("up","down"), counts.col=c("red","green"), > mar=rep(1,4), main="test") > vennDiagram(m, include=c("both"), counts.col=c("blue"), mar=rep(1,4), > main="test") > dev.off() > >> sessionInfo() > R version 2.8.1 (2008-12-22) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United > States.1252;LC_MONETARY=English_United > States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 > > attached base packages: > [1] tools stats graphics grDevices utils datasets > methods base > > other attached packages: > [1] limma_2.16.4 venn_1.6 pvclust_1.2-1 > org.Hs.eg.db_2.2.6 KEGG.db_2.2.5 hgu133a.db_2.2.5 > RSQLite_0.7-1 > [8] DBI_0.2-4 AnnotationDbi_1.4.3 Biobase_2.2.2 > > > -------------------------------------------------------------------- ---- > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Douglas Lab 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826
ADD COMMENT

Login before adding your answer.

Traffic: 654 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6