-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(coloc): single SNP case #511
Conversation
…tropy into coloc_unit_tests
What is the status here? |
Added additional tests for other edge cases where the overlapping SNPs are not causal/ only causal in one study. The fix returns sensible results in both cases(high h0 or high h1). This doesn't happen in practice as we take the union of the overlaps between credible sets, in Finngen r10 for example there are 3.4k/39k studyLocusOverlaps which are single SNP, all of which are causal (min.PP = ~0.95, avg.PP=0.99). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks healthy. One small comment to make more clear why things are done in this way but nothing critical. Feel free to merge when appropiate
* feat: include single snp overlaps in coloc calcs * chore: added unit test for coloc * feat: include single snp overlaps in coloc calcs * chore: added unit test for coloc * fix: check for differences in test results * fix: revert changes to single snp coloc tests for other pr * fix: revert single snp change * chore: restructure test folder * fix: compare differences in results rather than exact match * chore: test description * fix: allow for coloc when only one snp is overlapping * chore: include tests for h0 and h1/2 * fix: added pseudocount variable to coloc * fix: pseudocount as a Coloc attribute --------- Co-authored-by: David Ochoa <ochoa@ebi.ac.uk>
no longer filtering out single snp studyLocusOverlaps.
when: f.col("sumlogsum") == f.col("logsum12") == 0 :
This causes problems when we have to log the result.
Instead of 0, replace with a very small number.
Works when one causal snp is overlapping, returns high h4 value very close to 1.