feat: implement posterior prob filter for COLOC at small overlaps N<10 #977
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✨ 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.
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
dev
branch?make test
)?poetry run pre-commit run --all-files
)?