Entering edit mode

Dai-Ying,
Thanks for reporting this bug which happens when some of the peaks in
a
dataset overlap with multiple peaks in another dataset! What do you
think if
I set the number to 0 if it becomes negative? Thanks!
Best regards,
Julie
On 3/22/12 9:49 PM, "Dai-Ying Wu" <daiyingw at="" usc.edu=""> wrote:
> Hi Dr Zhu,
> Please disregard the accessing findVennCounts() section of the last
email.
> I have been able to reproduce the negative values in venn diagram
with the
> following code
>
> p1 = RangedData(IRanges(start=c(100, 500), end=c(199, 599),
names=c("s1",
> "s2")
> p2 = RangedData(IRanges(start=c(110, 190, 320, 650), end=c(150, 199,
340,
> 680), names=c("s1", "s0", "s2", "s3")))
> p3 = RangedData(IRanges(start=c(130, 330, 530, 800), end=c(150, 350,
550,
> 900), names=c("s1", "s2", "s3", "s4")))
> vtest = makeVennDiagram(RangedDataList(p3, p2, p1),
NameOfPeaks=c("p3", "p2",
> "p1"), totalTest=100)
>
> if you flip the order around, it will not show negative numbers but
the
> venncount will be incorrect
> vtest = makeVennDiagram(RangedDataList(p1, p2, p3),
NameOfPeaks=c("p1", "p2",
> "p3"), totalTest=100)
> in this diagram, the overlap between p1 and p2 (110) should be 1
instead of 0
> and (010) should be 1 instead of 2
>
> How do you advise I should proceed? Is there going to be a patch
made to
> makeVennDiagram to make the counting more consistent? I am currently
working
> on a dataset where I was looking at two replicates and pooled result
and I was
> getting negative numbers in the pooled result which led to very
strangely
> generated proportional venn diagrams.
>
> Best,
> Ying
>
> ----- Original Message -----
> From: Dai-Ying Wu <daiyingw at="" usc.edu="">
> Date: Thursday, March 22, 2012 5:30 pm
> Subject: ChIPpeakAnno findVennCounts
> To: julie.zhu at umassmed.edu
>
>> Hi Dr Zhu,
>> I have been trying to troubleshoot a venn diagram that I tried to
>> create with your very helpful ChIPpeakAnno software. I am trying to
>> create a 3-way venn diagram from 3 BED files and the 3rd comparison
>> gives a negative number. I have increased totaltest but that does
>> not seem to be the issue. I then try and debug it by going into the
>> code and try running it step by step, however, when i try to runb
>> findVennCounts it gives an "Error: object 'findVennCounts' not
>> found" and when I do "ChIPpeakAnno::findVennCounts" it gives not
>> exported object from 'namespace:ChIPpeakAnno'
>>
>> If I do ?findVennCounts and try and use the example at the end of
>> the page but it gives the same error. I am currently using
>> ChIPpeakAnno 2.2.0
>>
>> Thanks,
>> Ying Wu
>>