I need an explanation of a Venn diagram output. I have two peaks file resulted from MACS2, the first peak with 1318 peaks and the second one with 973 peaks. I converted the peaks files into Granges as follows:
bed_2 <- read.table("Concatenate_JARID2_peaks.narrowPeak_1.bed",header = TRUE, sep="t",stringsAsFactors=FALSE, quote="") peaks_2 <- toGRanges(bed_2, format="narrowPeak")
Then I make Venn diagram using the following command:
makeVennDiagram(list(peaks, peaks_2), NameOfPeaks=c("JARID2", "EZH2"),fill=c("#009E73", "#F0E442"), col=c("#D55E00", "#0072B2"),cat.col=c("#D55E00", "#0072B2"))
In the resulted Venn diagram, I got the total number for the first peak file as 682 and for the second one as 1023. The intersection peaks become as 289 so can anyone explain why I get more number in the second peak and less in the first one. Also, I would appreciate if anyone can check my commands and maybe share an alternative way to make Venn diagram for MACS2 peaks file.