if (interactive()){
peaks1 <- GRanges(seqnames=c("1", "2", "3"),
IRanges(start=c(967654, 2010897, 2496704),
end=c(967754, 2010997, 2496804),
names=c("Site1", "Site2", "Site3")),
strand="+",
feature=c("a","b","f"))
peaks2 = GRanges(seqnames=c("1", "2", "3", "1", "2"),
IRanges(start = c(967659, 2010898,2496700,
3075866,3123260),
end = c(967869, 2011108, 2496920,
3076166, 3123470),
names = c("t1", "t2", "t3", "t4", "t5")),
strand = c("+", "+", "-", "-", "+"),
feature=c("a","b","c","d","a"))
makeVennDiagram(list(peaks1, peaks2), NameOfPeaks=c("TF1", "TF2"),
totalTest=100,scaled=FALSE, euler.d=FALSE)
makeVennDiagram(list(peaks1, peaks2), NameOfPeaks=c("TF1", "TF2"),
totalTest=100)
###### 4-way diagram using annotated feature instead of chromosome ranges
makeVennDiagram(list(peaks1, peaks2, peaks1, peaks2),
NameOfPeaks=c("TF1", "TF2","TF3", "TF4"),
totalTest=100, by="feature",
main = "Venn Diagram for 4 peak lists",
fill=c(1,2,3,4))
}
Run the code above in your browser using DataLab