-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add medical action association table to UI (plus fixture & enum regen) #937
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for monarch-app canceled.
|
…counts & association table searches
… queries, update fixtures, format
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #937 +/- ##
==========================================
- Coverage 71.26% 70.77% -0.49%
==========================================
Files 91 91
Lines 3149 3100 -49
==========================================
- Hits 2244 2194 -50
- Misses 905 906 +1 ☔ View full report in Codecov by Sentry. |
self.nlp = spacy.load(str(str(model_archive.parent / model_subdir.name / inner_model_dir.name / model_subdir.name))) | ||
self.nlp = spacy.load( | ||
str(str(model_archive.parent / model_subdir.name / inner_model_dir.name / model_subdir.name)) | ||
) | ||
|
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 in this file is just formatting changes that got picked up
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.
Check, I'm ignoring it then.
@@ -4,6 +4,9 @@ on: | |||
pull_request: | |||
workflow_dispatch: | |||
|
|||
env: | |||
PYTHONPATH: ${{ github.workspace }}/backend | |||
|
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.
fix for #935
@amc-corey-cox @ptgolden The more straightforward part of this is the specific handling for MaXO associations in the UI. The weird part is that by default, we want disease pages to return these MaXO associations in the association-counts part of the entity response, and be able to fetch an association table for MaXO associations where the ID of the page that we're on is a MONDO ID which is in the disease_context_qualifier or disease_context_qualifier_closure field. I handled that by expanding what is matched in the API endpoint for the |
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.
I didn't review the big diffs in tests/ or frontend/fixtures but I don't see anything that jumps out as concerning to me. I flagged a couple of things just to make sure you noticed them and that they were done on purpose.
There doesn't appear to be a deploy preview. Would you like me to review the frontend view?
WEB_PAGE = "biolink:WebPage" | ||
ZYGOSITY = "biolink:Zygosity" | ||
MOLECULAR_ENTITY = "biolink:MolecularEntity" | ||
LIFE_STAGE = "biolink:LifeStage" |
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.
I'm going to presume that all of these deletions and additions make sense, although I admit I didn't check to make sure we don't need these.
CHEMICAL_OR_DRUG_OR_TREATMENT_TO_DISEASE_OR_PHENOTYPIC_FEATURE_ASSOCIATION = ( | ||
"biolink:ChemicalOrDrugOrTreatmentToDiseaseOrPhenotypicFeatureAssociation" | ||
) | ||
VARIANT_TO_PHENOTYPIC_FEATURE_ASSOCIATION = "biolink:VariantToPhenotypicFeatureAssociation" |
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.
Again, I'll presume your reorganization is for improving readability or logical consistency.
): | ||
# This is a special case for disease_context_qualifier, if an association between two other entities | ||
# only occurs within the context of a disease, we can treat it like an incoming association | ||
direction = AssociationDirectionEnum.incoming |
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.
Codecov is complaining that 261 and 267 aren't covered by tests. It seems reasonable to ignore this but if it's easy to make a test here it would be nice to cover these edge cases.
self.nlp = spacy.load(str(str(model_archive.parent / model_subdir.name / inner_model_dir.name / model_subdir.name))) | ||
self.nlp = spacy.load( | ||
str(str(model_archive.parent / model_subdir.name / inner_model_dir.name / model_subdir.name)) | ||
) | ||
|
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.
Check, I'm ignoring it then.
… expansion fields
…ble, add some unfortunate hardcoding for external CHEBI links when we don't have the CHEBI node
…D is in the disease_context_qualifier slot
Adds a medical action table showing the MaXO term, predicate, phenotype and disease. For simplicity sake, the section is labeled as "Medical Action" on both MaXO pages and phenotype pages.
Creating as a draft, because I realized that it needs to show up on disease pages as well, which means that the API request will need to change so that when "entity=" comes into the api request, disease_context_qualifier is searched, and I think we'll also want to make sure we're searching disease_context_qualifier_closure as well (which is hopefully already getting generated!
Closes #919
Closes #935