Skip to content
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: implement posterior prob filter for COLOC at small overlaps N<10 #977

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

xyg123
Copy link
Contributor

@xyg123 xyg123 commented Jan 22, 2025

✨ Context

There is instability of COLOC at small overlaps due to inflation of the likelihood term calculation, the problem is overviewed in the issue.

🛠 What does this PR implement

We now only pass small overlaps to COLOC if the overlapping probabilities are > 0.9 on both sides, which means the inflated H4s will be likely to be true colocalisation results. The parameters chosen here, PP > 0.9 and N <10 to achieve a comparable proportion of significant h4 results with the prev. OTG portal.

Total Colocalisation Results Number of COLOC H4 > 0.8 Percentage of COLOC H4 > 0.8
Gentropy release 24.12 23,709,155 17,553,867 74.04%
OTG portal release 22.10 7,408,493 4,357,079 58.81%
Gentropy 24.12 N>10 8,566,692 4,530,616 52.88%

Tests related to COLOC have been adjusted accordingly, to include posterior probabilities of >0.9 on both sides to prevent filtering out.

🙈 Missing

Future work will involve dynamic penalising of the prior term in H4 calculations, when the overlaps are small.
Implement parameters into COLOC method

🚦 Before submitting

  • [ x] Do these changes cover one single feature (one change at a time)?
  • [ x] Did you read the contributor guideline?
  • [ x] Did you make sure to update the documentation with your changes?
  • [ x] Did you make sure there is no commented out code in this PR?
  • [ x] Did you follow conventional commits standards in PR title and commit messages?
  • [ x] Did you make sure the branch is up-to-date with the dev branch?
  • [ x] Did you write any new necessary tests?
  • [ x] Did you make sure the changes pass local tests (make test)?
  • [ x] Did you make sure the changes pass pre-commit rules (e.g poetry run pre-commit run --all-files)?

@xyg123
Copy link
Contributor Author

xyg123 commented Jan 22, 2025

@addramir Please let me know if you'd like to discuss changing the parameters (PP > 0.9 and N<10).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant