Skip to content

Mondo-OMOP bridge

mondo_omop_bridge.py works in the opposite direction from the Phenopacket export. The Phenopacket export goes from source codes in the bundle to Mondo terms. The bridge starts from a Mondo disease term, walks the Mondo hierarchy to every descendant, and writes the ICD-10-CM and SNOMED CT codes cross-referenced to them, with their OMOP standard concepts when an Athena download is supplied. The result is a code list that defines a cohort in source records or in OMOP tables.

The approach and the use of Mondo's cross-references are adapted from the Monarch Initiative's mondo2omop (MIT License), with credit to its authors.

Module source (mondo_omop_bridge.py)

Questions it answers

  • Which ICD-10-CM and SNOMED CT codes cover ALS and every Mondo descendant of it, such as ALS with frontotemporal dementia and the gene-specific forms?
  • Which codes would define an epilepsy cohort in a warehouse query or a chart-review filter?
  • Which OMOP condition concepts should a CONDITION_OCCURRENCE filter use for the same cohort?

Choosing the target term

The bridge returns the target and its descendants only, so the target decides the cohort. ALS (MONDO:0004976) returns ALS and its subtypes; progressive muscular atrophy and primary lateral sclerosis are siblings of ALS in Mondo rather than descendants, so a code list for the whole motor neuron disease spectrum needs the broader motor neuron disease term, or several targets. Check the hierarchy in the Mondo browser before choosing.

Target Mondo ID
Amyotrophic lateral sclerosis MONDO:0004976 (a default)
Epilepsy MONDO:0005027 (a default)
Multiple sclerosis MONDO:0005301
Systemic lupus erythematosus MONDO:0007915
Nervous system disorder (very broad) MONDO:0005071

Following mondo2omop, only descendants of human disease (MONDO:0700096) are kept, and descendants of disease susceptibility, disease characteristic and injury are left out. Each output row also has Mondo's rare disease subset flags: rare, gard_rare (GARD), nord_rare (NORD), orphanet_rare (Orphanet), inferred_rare and mondo_rare.

Running it

python pipeline/mondo_omop_bridge.py --mondo /path/to/mondo.json --vocab /path/to/athena \
    --target MONDO:0004976 MONDO:0005027 --out mondo_omop_output
Option Default Effect
--mondo download mondo.json, or a folder holding it or the Mondo KGX TSV files
--mondo-version latest Mondo release date to download (YYYY-MM-DD)
--vocab none Athena folder; adds OMOP standard concepts
--target MONDO:0004976 MONDO:0005027 Mondo IDs to build code lists for
--out ./mondo_omop_output Output folder

Outputs

File Holds
MONDO2OMOP_<release>.tsv One row per Mondo term and cross-referenced source code (ICD-10-CM, SNOMED CT, MeSH), with the OMOP standard concept when found and the rare disease flags
cohort_<MONDO_ID>_codes.tsv The ICD-10-CM and SNOMED CT code list for the target and its descendants
cohort_<MONDO_ID>_omop.tsv The same list as OMOP standard concepts (only with --vocab)

The files hold codes only, no patient data. The master table is also a source of candidate rows for the Phenopacket seed tables; check each before adding it.

Getting Mondo

Without --mondo, the module downloads mondo.json from the Mondo GitHub releases, falling back to the OBO PURL; this needs an internet connection. In an environment without one, download mondo.json elsewhere, copy it in and pass its path. A downloaded release is cached and reused for the same version. Older Mondo KGX TSV files can still be read.

Codes with more than one standard concept

Some source concepts have more than one "Maps to" target, for example an ICD-10-CM code that maps to a condition and to a finding. Every target is read, and the Condition target is used for the code list.

Dependencies

The module uses the Python standard library for reading and joining. requests is needed only for downloading Mondo, and networkx is used for the hierarchy walk when installed; without it a standard-library breadth-first search gives the same result.