**20**wrote:

Hello everyone,

I am getting some surprising behaviour out of the ChIPpeakAnno R package. The question I’m trying to ask is ‘Which features intersect between samples ‘WT312’, ‘WT340’, and ‘WT354’, that also intersect with the intersection between samples ‘WT313’, ‘WT341’, and ‘WT355’. To visualize this, I am using makeVennDiagram to create two three-way venn diagrams: one for samples ‘WT312’, ‘WT340’, and ‘WT354’, and one for samples ‘WT313’, ‘WT341’, and ‘WT355’. Then I use findOverlappingPeaks to make an intersection of WT312, WT340, and WT354, which I call WT312_WT340_WT354. Separately, I also use findOverlappingPeaks to make an intersection of WT313, WT341, and WT355, which I call WT313_WT341_WT355. Then I take these two three-way intersected lists and pass those back through to makeVennDiagrams. The issue is that the total number of elements contained within the three-way venn diagrams for WT312-WT340-WT354 and WT313-WT341-WT355 do not sum up to the total number of elements from the two-way venn diagram. I’m attaching three PNG files to show what I’m talking about. Specifically, the number of elements that are found in WT312-WT340-WT354 in the two-way venn diagram exceeds the number of elements found to intersect between WT312-WT340-WT354 in the three-way venn diagram. The same basic story exists for WT313-WT341-WT355.

I can’t understand what would cause this behaviour, but it is a bit concerning for me. The intersection between the sets WT312-WT340-WT354 and WT313_WT341_WT355 should exactly sum to the intersection of the set WT312-WT340-WT354 and the the intersection of set WT313-WT341-WT355.

I'm pasting image links so you can see what I'm referring to.

487+395 = 882, not 852

and

292+395 = 687, not 674

Thanks,

Brad Davis

**1.0k**• written 3.3 years ago by Brad Davis •

**20**