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(ld_annotator): optional r2 threshold #648

Merged
merged 5 commits into from
Jun 18, 2024
Merged

feat(ld_annotator): optional r2 threshold #648

merged 5 commits into from
Jun 18, 2024

Conversation

ireneisdoomed
Copy link
Contributor

@ireneisdoomed ireneisdoomed commented Jun 17, 2024

✨ Context

We want to be able to apply a threshold in the step of annotating the LD set of a StudyLocus dataset.

🛠 What does this PR implement

  • Added StudyLocus.filter_ld_set, that enables to apply a filter on each r2 (after weighting by population)
  • Application of that method in LDAnnotator.ld_annotate

🙈 Missing

🚦 Before submitting

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

@d0choa
Copy link
Collaborator

d0choa commented Jun 18, 2024

As I commented to @ireneisdoomed, there is an issue here, because annotate_ld is already based in a filtered LDIndex. This needs to be more clear.

This space is a bit messy at the moment. There is another related situation with the credible sets from finemapping that are at the moment lacking the LD annotation (between lead and tag). If we keep relying on the LDIndex for all these, we are applying dataset that was pre-filtered for the only purpose of the PICS road

@ireneisdoomed
Copy link
Contributor Author

Your comment is correct, @d0choa. By default, we are already filtering by 0.5, and updated the docs.
This is just an additional parameter in the annotation step to have a more conservative value. I understand it is not ideal to follow 2 approaches. However, even though the LD Index is only used in the PICS road, I think it is still very valuable outside of the ETL to quickly fetch the correlated variaants.

Copy link
Contributor

@addramir addramir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me. We are going to use the LD annotation and LD clumping for filtering duplicated credible sets after fine-mapping. As sugested by UKBB-PPP, the used threshold of R2>=0.8, stricter than 0.5.
It shouldn't alter the PICS route.

@ireneisdoomed ireneisdoomed merged commit 6d93192 into dev Jun 18, 2024
4 checks passed
@ireneisdoomed ireneisdoomed deleted the il-filter-ld branch June 18, 2024 15:41
project-defiant pushed a commit that referenced this pull request Jul 12, 2024
* feat(ld_annotator): apply r2 threshold

* feat(ld_annotator): apply r2 threshold

* chore(ldannotator): change threshold to 0.5
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.

3 participants