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: EFO l2g merge features #737

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

feat: EFO l2g merge features #737

wants to merge 5 commits into from

Conversation

xyg123
Copy link
Contributor

@xyg123 xyg123 commented Aug 27, 2024

✨ Context

This PR implements the merging of features for studylocus-to-gene in L2G, this is to address the high rate of missingness as well as the class imbalance between Goldstandard positives/negatives.

🛠 What does this PR implement

New function in the L2GFeatureMatrix class: "merge_features_in_efo":
For a given studylocus-to-gene entry in the L2G feature matrix, say studyLocus_1 to gene_1 :
Identify all other studies which are of the same EFO/trait.
Identify other studylocus-to-gene entries for gene_1 from these studies, which are within a set window size (default 500kb) to studyLocus_1:
merge all features from these entries together into a single row, taking the maximum where necessary.

New function in the L2GGoldstandards class: "balance_classes"
Downsamples the Goldstandard negative set randomly, based on a predefined upper limit for the GSN:GSP ratio (defaults to 2).

🚦 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)?

@addramir addramir changed the title Xg l2g merge features feat: EFO l2g merge features Sep 25, 2024
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