Hi and thanks for the reply!
I have, but I am not sure what I would use for the totals including the non-overlapping peaks and annotations, would this be correct?
phyper(10450, 100561, 100561+204652, 204652-100561)
Hi,
I am trying to find a p-value for enrichment of ChIP-Seq peaks from a bed file within a chromatin state from the UCSC stored in another bed file. I overlapped the two bed files using BedTools and now I have these values:
The number of ChiP-Seq peaks that overlap a chromatin state (more than one peak can overlap a chromatin state, but a specific peak belongs to only one chromatin state)= 10450
The total number of ChiP-Seq peaks = 100561
The total coverage of a chromatin state = 204652
How can I get a p-value of enrichment for the CHiP-Seq peak within the chromatin state?
Thank you
Have you thought about the phyper function in R?
Hi and thanks for the reply!
I have, but I am not sure what I would use for the totals including the non-overlapping peaks and annotations, would this be correct?
phyper(10450, 100561, 100561+204652, 204652-100561)
Probability of gene list overlap
See if this helps you, I'd give you specifics but I'm not comfortable enough with my knowledge of this function to do that.
Thanks this helps, but I am still confused about what our k would be, if we consider the number of ChiP-Seq peaks:
q=10450-1, m=100561, n=204652, k=204652?
Also would it not be important to consider that more than one ChIP peak can overlap each chromatin state?
Log in to answer this question.
This biostar answer is quite comprehensive. Personally, I had used the bedtools fisher, you'll need your list of peaks, your list of chromatin states and a file with the chromosome sizes.