Skip to content

Commit

Permalink
ORDO Mappings
Browse files Browse the repository at this point in the history
- Add: New release output: ordo-icd11.sssom.tsv
  - Completed work in mappings.py
  - Add: utils.py for this: This file now has several functions that are exactly the same in several repositories. Needs to be put into a package.
- Update: config/icd11.sssom-metadata.yml: removed some unnecessary entries. Added necessary ones.
- Add: requirements*.txt files: for installation of Python packages; and updated readme about that.
- Delete: Temporary anlalysis files in src/compare_*/
- Add: icd11mms-exact-matches.sparql for querying ordo.owl for mappings. But this may not be necessary and may get removed.
- Add: src/temp_compare_matches_owl_and_nomenclature.py: Temporary file for analysis for comparing Ordo->ICD11MMS exact matches from nomenclature file and from OWL release.
  • Loading branch information
joeflack4 committed Mar 30, 2024
1 parent 9b03e83 commit 1b4b0a9
Show file tree
Hide file tree
Showing 15 changed files with 283 additions and 38,864 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# ICD11 Foundation Ingest

## Pre-reqs
- Docker
- Docker images
One or both of the following, depending on if you want to run the stable build `latest` or `dev`:
- a. `docker pull obolibrary/odkfull:latest`
- b. `docker pull obolibrary/odkfull:dev`

## Running
`sh run.sh make all`
# ICD11 Foundation Ingest

## Pre-reqs
- Docker
- Docker images
One or both of the following, depending on if you want to run the stable build `latest` or `dev`:
- a. `docker pull obolibrary/odkfull:latest`
- b. `docker pull obolibrary/odkfull:dev`

## Local development setup
`pip install -r requirements.txt`

## Running
`sh run.sh make all`
9 changes: 1 addition & 8 deletions config/icd11.sssom-metadata.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
creator_id: 0000-0002-2906-7319
curie_map:
GTR: http://purl.obolibrary.org/obo/mondo/mappings/unknown_prefix/GTR/
HP: http://purl.obolibrary.org/obo/HP_
MESH: http://identifiers.org/mesh/
MONDO: http://purl.obolibrary.org/obo/MONDO_
NCIT: http://purl.obolibrary.org/obo/NCIT_
OMIM: https://omim.org/entry/
Orphanet: http://www.orpha.net/ORDO/Orphanet_
SCTID: http://identifiers.org/snomedct/
UMLS: http://purl.obolibrary.org/obo/UMLS_
icd11.foundation: http://id.who.int/icd/entity/
oboInOwl: http://www.geneontology.org/formats/oboInOwl#
owl: http://www.w3.org/2002/07/owl#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
Expand Down
26 changes: 17 additions & 9 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SOURCE_URL=https://icd11files.blob.core.windows.net/tmp/whofic-2023-04-08.owl.gz


# MAIN COMMANDS / GOALS ------------------------------------------------------------------------------------------------
all: tmp/output/release/icd11foundation.owl
all: tmp/output/release/icd11foundation.owl tmp/output/release/ordo-icd11.sssom.tsv

clean:
rm -rf tmp/
Expand Down Expand Up @@ -37,14 +37,22 @@ release: | tmp/output/release/
gh release create $(VERSION) --notes "New release." --title "$(VERSION)" tmp/output/release/*

# Mappings
tmp/input/mappings.json: | tmp/input/
wget -qO tmp/input/en_product1.json.tar.gz https://www.orphadata.com/data/json/en_product1.json.tar.gz
tar -xvf tmp/input/en_product1.json.tar.gz -C tmp/input/
mv tmp/input/en_product1.json $@
rm tmp/input/en_product1.json.tar.gz

tmp/output/release/ordo-icd11.sssom.tsv: tmp/input/mappings.json | tmp/output/release/
python3 src/make_sssom.py $< > $@
# todo: Stable URI/filename issue: https://github.com/monarch-initiative/icd11/pull/12#discussion_r1542187711
tmp/input/Orphanet_Nomenclature_Pack_EN/ORPHA_ICD11_mapping_en_newversion_2023.xml: | tmp/input/
wget https://www.orphadata.com/data/nomenclature/packs/Orphanet_Nomenclature_Pack_EN.zip -O tmp/input/Orphanet_Nomenclature_Pack_EN.zip
unzip tmp/input/Orphanet_Nomenclature_Pack_EN.zip -d tmp/input/Orphanet_Nomenclature_Pack_EN

tmp/input/ordo.owl: | tmp/input/
wget http://www.orphadata.org/data/ORDO/ordo_orphanet.owl -O $@

tmp/output/icd11mms-exact-matches.tsv: tmp/input/ordo.owl
robot query -i $< --query src/icd11mms-exact-matches.sparql $@

tmp/output/release/ordo-icd11.sssom.tsv: tmp/input/Orphanet_Nomenclature_Pack_EN/ORPHA_ICD11_mapping_en_newversion_2023.xml tmp/output/icd11mms-exact-matches.tsv | tmp/output/release/
python3 src/mappings.py \
--input-nomenclature-xml tmp/input/Orphanet_Nomenclature_Pack_EN/ORPHA_ICD11_mapping_en_newversion_2023.xml \
--input-sssom-config config/icd11.sssom-metadata.yml \
--outpath $@

# HELP -----------------------------------------------------------------------------------------------------------------
help:
Expand Down
2 changes: 2 additions & 0 deletions requirements-unlocked.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pandas
pyyaml
14 changes: 14 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
distlib==0.3.6
filelock==3.9.0
numpy==1.25.1
pandas==2.0.3
pbr==5.11.1
platformdirs==3.1.0
python-dateutil==2.8.2
pytz==2023.3
PyYAML==6.0.1
six==1.16.0
stevedore==5.0.0
tzdata==2023.3
virtualenv==20.20.0
virtualenv-clone==0.5.7
5,781 changes: 0 additions & 5,781 deletions src/compare_component_and_website_data/comp.txt

This file was deleted.

Loading

0 comments on commit 1b4b0a9

Please sign in to comment.