Question: Scaled venn/euler diagram using makeVennDiagram
0
gravatar for da.de
4.2 years ago by
da.de10
Austria
da.de10 wrote:

Hi,

I am using the ChIPpeakAnno package for analysis of my ChIPseq data. However, I am having some problems with the makeVennDiagramm function. I have three datasets to overlap. And although I am using the euler and scaled=TRUE I do not succeed in getting a scaled diagram.

makeVennDiagram (RangedDataList(peaksR[[1]], peaksR[[3]], peaksR[[5]]), total=100000, NameOfPeaks=c("A", "B", "C"), cat.cex=1, margin=0.1, cat.dist=0.07, euler.d=TRUE, scaled=TRUE, alpha=c(0.8, 0.8, 0.8), minoverlap=10)

Any suggestions how to do this?

For other analysis I have used the Vennerable package. Would it be possible to export the VennCounts (made by makeVennDiagram) into a data.frame so that I can use it as an input for the other package?

Thanks for your help!
Dagmar

chippeakanno venn diagram • 1.0k views
ADD COMMENTlink modified 4.2 years ago by Ou, Jianhong1.1k • written 4.2 years ago by da.de10
Answer: Scaled venn/euler diagram using makeVennDiagram
0
gravatar for Ou, Jianhong
4.2 years ago by
Ou, Jianhong1.1k
United States
Ou, Jianhong1.1k wrote:

Hi Dagmar,

 

Thank you for choosing ChIPpeakAnno in your research. This is a bug of VennDiagram package. I think you want to have a try with the package Vennerable. In the vignettes of ChIPpeakAnno, I put codes how to use Vennerable. I also paste a sample here. Hope this will help.

library(ChIPpeakAnno)
peaks1 <- GRanges("chr1", IRanges(seq(1, 100, 5), width=2), "+")
peaks2 <- GRanges("chr1", IRanges(seq(2, 20, 3), width=2), "+")
peaks3 <- GRanges("chr1", IRanges(seq(10, 50, 4), width=2), "+")
res <- makeVennDiagram(Peaks=list(peaks1, peaks2, peaks3), NameOfPeaks=c("TF1", "TF2", "TF3"))
install.packages("Vennerable", repos="http://R-Forge.R-project.org", type="source")
library(Vennerable)
venn_cnt2venn <- function(venn_cnt){
 n <- which(colnames(venn_cnt)=="Counts") - 1
 SetNames=colnames(venn_cnt)[1:n]
 Weight=venn_cnt[,"Counts"]
 names(Weight) <- apply(venn_cnt[,1:n], 1, paste, collapse="")
 Venn(SetNames=SetNames, Weight=Weight)
 }
v <- venn_cnt2venn(res$vennCounts)
plot(v)
ADD COMMENTlink written 4.2 years ago by Ou, Jianhong1.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 252 users visited in the last hour