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: Schema 4.0.0 enrichment #6273

Merged
merged 3 commits into from
Nov 29, 2023

Conversation

MillenniumFalconMechanic
Copy link
Collaborator

@MillenniumFalconMechanic MillenniumFalconMechanic commented Nov 27, 2023

Reason for Change

Changes

  • Updated enrichment functionality to handle Schema 4.0.0 tissue type format.
  • Updates are added behind the Schema 4.0.0 feature flag and should allow for enrichment of both 3.0.0 and 4.0.0 tissue type formats.

Testing steps

  • Added Schema 4.0.0-specific tests.
  • Created Schema 4.0.0 collection in rdev (with ancestor and descendant fixtures mocked to match rdev data) and reviewed tissue_ancestors:

rdev-enrichment-response

import copy

modified_metadata = copy.deepcopy(self.sample_dataset_metadata)
modified_metadata.development_stage = [OntologyTermId("Test", "HsapDv:0000008")]
modified_metadata.tissue = [TissueOntologyTermId("Test", "UBERON:0002048", "cell culture")]
modified_metadata.tissue = [TissueOntologyTermId("Test", "UBERON:0002048")]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Keeping this method Schema 3.0.0-specific as a check against possible regressions; to be removed with #6266. See here for Schema 4.0.0 test.

Copy link
Contributor

Deployment Summary

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9857ef6) 91.76% compared to head (57d2671) 91.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6273      +/-   ##
==========================================
+ Coverage   91.76%   91.78%   +0.02%     
==========================================
  Files         175      175              
  Lines       14129    14167      +38     
==========================================
+ Hits        12965    13003      +38     
  Misses       1164     1164              
Flag Coverage Δ
unittests 91.78% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MillenniumFalconMechanic MillenniumFalconMechanic changed the title Updated enrichment. feat: Schema 4.0.0 enrichment Nov 27, 2023
@MillenniumFalconMechanic MillenniumFalconMechanic marked this pull request as ready for review November 27, 2023 23:59
@@ -23,3 +35,17 @@ def enrich_dataset_with_ancestors(dataset, key, ontology_mapping):
unique_ancestors = list(OrderedDict.fromkeys(flattened_ancestors))
if unique_ancestors:
dataset[f"{key}_ancestors"] = unique_ancestors


def generate_tagged_ontology_id(tissue):
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: what do you think of renaming this function generate_tagged_tissue_ontology_id since its tissue-specific?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hey @nayib-jose-gloria, I have updated the function name!

Copy link
Contributor

@nayib-jose-gloria nayib-jose-gloria left a comment

Choose a reason for hiding this comment

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

thank you!

@MillenniumFalconMechanic MillenniumFalconMechanic added this pull request to the merge queue Nov 28, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 28, 2023
@MillenniumFalconMechanic MillenniumFalconMechanic added this pull request to the merge queue Nov 28, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 28, 2023
@MillenniumFalconMechanic MillenniumFalconMechanic merged commit 6192386 into main Nov 29, 2023
40 checks passed
@MillenniumFalconMechanic MillenniumFalconMechanic deleted the mim/6261-schema-4-enrichment branch November 29, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants