jianhong/ChIPpeakAnno

makeVennDiagram

Opened this issue · 4 comments

Now, I had ploted Venn plot by findOverlapsOfPeaks and makeVennDiagram. And why the order of set names is "B", "A". How to change this order? Could you help me?
Thanks!
image

The names should be in the same order as those specified in the NameOfPeaks parameter.

The names should be in the same order as those specified in the NameOfPeaks parameter.

NameOfPeaks = c('A','B') had beed seted

Try plot the data by Vennerable. Let me know if it does not work.

if (!library(Vennerable)) {
  install.packages("Vennerable", repos="http://R-Forge.R-project.org")
  library(Vennerable)
}

n <- which(colnames(ol$vennCounts) == "Counts") - 1
set_names <- colnames(ol$vennCounts)[1:n]
weight <- ol$vennCounts[, "Counts"]
names(weight) <- apply(ol$vennCounts[, 1:n], 1, base::paste, collapse = "")
v <- Venn(SetNames = set_names, Weight = weight)
plot(v)

Another possible solution is

makeVennDiagram(listofpeaks, ..., ,inverted=TRUE, cat.pos = c(90, 270))