if(interactive()){
peaks1 = RangedData(IRanges(start = c(967654, 2010897, 2496704),
end = c(967754, 2010997, 2496804),
names = c("Site1", "Site2", "Site3")),
space = c("1", "2", "3"),
strand=as.integer(1),
feature=c("a","b", "c"))
peaks2 =
RangedData(IRanges(start=c(967659, 2010898, 2496700, 3075866, 3123260),
end=c(967869, 2011108, 2496920, 3076166, 3123470),
names = c("t1", "t2", "t3", "t4", "t5")),
space = c("1", "2", "3", "1", "2"),
strand = c(1, 1, -1,-1,1),
feature=c("a","c","d","e", "a"))
getVennCounts(peaks1,peaks2, maxgap=0)
getVennCounts(peaks1,peaks2, maxgap=0, by="feature")
getVennCounts(peaks1, peaks2, maxgap=0, by="base")
}
Run the code above in your browser using DataLab