counts of overlapping peaks using findOverlapOfPeaks from ChIPpeakAnno
3
1
Entering edit mode
C T ▴ 140
@c-t-5858
Last seen 19 months ago
United States

Hello, Does anyone know how number of overlapping peaks are counted when using finOverlapsOfPeaks with connectedPeaks="keepAll" here is the arguments that I used:

test.venn <- findOverlapsOfPeaks(atac1, atac2, connectedPeaks="keepAll")

and the resulting venn counts:

test.venn$venn_cnt
     atac1 atac2 Counts count.atac1 count.atac2
[1,]     0     0      0           0           0
[2,]     0     1  42635           0       42635
[3,]     1     0  30492       30492           0
[4,]     1     1  97680       98808      102493

I know in test.venn[4,], count.atac2 is the number of overlap using atac2 as reference and count.atac1 is the number of overlap using atac1 as reference. However, I can't figure out where Counts=97680 comes from.

Thank you in advance for your help.

chippeakanno • 2.4k views
ADD COMMENT
1
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 13 months ago
United States

Yes, you were right about test.venn[4, 4:5]. For test.venn[4,3], i.e., 97680 is the sum of the minimal number of involved peaks in each group of connected/overlapped peaks.

If you run test.venn <- findOverlapsOfPeaks(atac1, atac2, connectedPeaks="min"), you will get 97680.

For more information about this function, please type help(findOverlapsOfPeaks)

We will update the help menu soon as the following. Please let us know if the following help menu is clear. Any suggestions are welcome and appreciated.

connectedPeaks

If multiple peaks are involved in any group of connected/overlapping peaks in any input peak list, set it to "merge" will add 1 to the overlapping counts, while set it to "min" will add the minimal involved peaks in each group of connected/overlapped peaks to the overlapping counts. Set it to "keepAll" will add the number of involved peaks for each peak list to the corresponding overlapping counts. In addition, it will output counts as if connectedPeaks were set to "min".

Thanks!

Best regards,

Julie

ADD COMMENT
1
Entering edit mode

Thank you very much for answering my questions. I am very sorry but I'm still confused. What does " the sum of the minimal number of involved peaks in each group of connected/overlapped peaks" means?

For example: If 5 peaks in group1 are overlapping with 2 peaks in group 2, does setting connectedPeaks to "min" will add 2 to the overlapping counts?

ADD REPLY
0
Entering edit mode

Yes, you were right! 2 will be added to the overlapping counts.

Best regards,

Julie

ADD REPLY
1
Entering edit mode

Ah...ok. I think I start to understand.

That means, if 5 peaks in group1 are overlapping with 2 peaks in group 2, setting connectedPeaks to "merge" will add 1 to the overlapping counts? For "keepAll", 5 peaks will be added to count.group1 and 2 will be added to count.group2 and 2 will be added to counts?

ADD REPLY
0
Entering edit mode

Exactly! You nailed it!

Do you mind if we add your examples to the help menus?

Thanks!

Best regards,

Julie

ADD REPLY
1
Entering edit mode

Of course you can add my examples to the help menus. That'd be cool :-)

Thank you so much for all your efforts to keep the documentation clear and up to date. I really appreciate this.

As you may have guessed, I am using your package to analyze ATAC-seq data. Any plan to extend the package for ATAC-seq or at least the makeVennDiagram? I found test for overlap to be very useful. However, the default totalTest estimate is too small for accessibility regions and I can't figure out a similar estimate for accessible regions.

ADD REPLY
1
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 13 months ago
United States

Thanks! We will add your example to the help menus and add a link to this post so that you get credit for this.

Please feel free to change totalTest to a large number. I agree with you that it is not easy to come up with a good estimate. Table 1 at https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3202292 might help you set the totalTest.

Alternatively, you can use the function peakPermTest. Please type help(peakPermTest) for parameter settings and refer the user guide for examples at https://www.bioconductor.org/packages/devel/bioc/vignettes/ChIPpeakAnno/inst/doc/ChIPpeakAnno.html#perform-permutation-test-to-determine-if-there-is-a-significant-overlap-between-two-sets-of-peaks.

Best,

Julie

ADD COMMENT
1
Entering edit mode

You don't have to give me credit, it's just a small example. But, appreciate the thought.

Thank you very much for your suggestions. I'll look up the table 1 link you provided. I somehow didn't realize ChIPpeakAnno has permutation test. I'll have to check that out. Thanks!!

ADD REPLY
0
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 13 months ago
United States

Thanks! We will add your example to the help menus and add a link to this post so that you get credit for this.

Please feel free to change totalTest to a large number. I agree with you that it is not easy to come up with a good estimate. Table 1 at https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3202292 might help you set the totalTest.

Alternatively, you can use the function peakPermTest. Please type help(peakPermTest) for parameter settings and refer the user guide for examples at https://www.bioconductor.org/packages/devel/bioc/vignettes/ChIPpeakAnno/inst/doc/ChIPpeakAnno.html#perform-permutation-test-to-determine-if-there-is-a-significant-overlap-between-two-sets-of-peaks.

Best,

Julie

ADD COMMENT

Login before adding your answer.

Traffic: 800 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6