Skip to content

Medication ontology - graph restriction update #1331

Open
@arschat

Description

@arschat

Lung Tier 2 medication in the last month field should have values from the DRug ONtology as stated in the description

Please indicate the last known therapy, as drug categories from the Drug Ontology (DRON), administered to the patient within the last month prior to sample collection. If this information is not shareable due to data privacy restrictions, please indiciate "not shareable".

For that reason we updated the medical_history schema (v7.0.0) to use the dron ontology and specified the graph restriction to the children of material entity.

However, for projects like #1316 we had to add medications (Oral contraceptive progestin) that did not match any DRON term from the subgraph we've added.

For that reason we decided to check the mapping of the medications that we've previously wrangled.

  1. Pull medication data from ingest
  2. Wrangle the data to clean the values
  3. Use ZOOMA to get matches from all OLS
  4. Decide which ontology is more comprehensive for us to include

Note: Since lung is asking for DRON, I believe we should have it anyway in the graph restriction. However, we can also add another ontology in the graph and suggest the usage of one of those.

from hca_ingest.api.ingestapi import IngestApi

query  = [{
        "field": "content.medical_history.medication",
        "operator": "REGEX",
        "value": ".*"
}]

api = IngestApi(url="https://api.ingest.archive.data.humancellatlas.org/")
api.set_token(f"Bearer {<token>}")
response = api.post('https://api.ingest.archive.data.humancellatlas.org/biomaterials/query?operator=AND&size=535', json=query)

med=[]
for donor in response.json()['_embedded']['biomaterials']:
    med.append(donor['content']['medical_history']['medication'])

set(med)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions