Closed maxsibilla closed 1 month ago
In schema_triggers.py
get_organ_hierarchy
will return the organ without the string inside of parenthesis. For instance if the organ is Lung (Left)
this trigger will set the property organ_hierarchy
to "Lung".
get_dataset_type_hierarchy
will have to loop through the response from https://ontology-api.dev.hubmapconsortium.org/assayclasses?application_context=SENNET. If the dataset_type
value is for example CODEX [Cytokit + SPRM]
, the trigger will set the property dataset_type_hierarchy
to CODEX
.
dataset_type
can be found in object.value.description
while the hierarchy can be found at object.value.dataset_type.dataset_type
This is ready:
Branch commit: https://github.com/sennetconsortium/entity-api/compare/main...libpitt/408-hierarchy
Requires: atlas-consortia-commons 1.0.13
https://test.pypi.org/project/atlas-consortia-commons/
Update app.cfg with new assay_classes
property:
UBKG_CODES = '{"specimen_categories":"C020076", "dataset_types":{"code": "C003041", "key": "datasets", "endpoint": "valueset?parent_sab=SENNET&parent_code=C003041&child_sabs=SENNET"}, "organ_types":{"code": "C000008", "key": "organs", "endpoint": "organs?application_context=SENNET"}, "entities": "C000012", "source_types":"C050020", "assay_classes":{"code": "C004000", "key": "assay_classes", "endpoint": "assayclasses?application_context=SENNET"}}'
Results:
Sample:
Dataset:
Two new properties need to be added to the provenance schema.
For
Sample
:For
Dataset
: