From 1649efcaf98ef7e910bb907d6bde86c2c906da74 Mon Sep 17 00:00:00 2001 From: Joe Flack Date: Thu, 8 Feb 2024 18:24:53 -0500 Subject: [PATCH] ICD11 Ingest - Update: mondo-ingest.Makefile - Add: $(COMPONENTSDIR)/icd11.owl WIP --- src/ontology/Makefile | 2 +- src/ontology/mondo-ingest.Makefile | 16 ++++++++++ .../icd11foundation-relevant-diseases.sparql | 32 ------------------- 3 files changed, 17 insertions(+), 33 deletions(-) delete mode 100644 src/sparql/icd11foundation-relevant-diseases.sparql diff --git a/src/ontology/Makefile b/src/ontology/Makefile index ea15d81bf..53ed676ba 100644 --- a/src/ontology/Makefile +++ b/src/ontology/Makefile @@ -54,7 +54,7 @@ OBODATE ?= $(shell date +'%d:%m:%Y %H:%M') VERSION= $(TODAY) ANNOTATE_ONTOLOGY_VERSION = annotate -V $(ONTBASE)/releases/$(VERSION)/$@ --annotation owl:versionInfo $(VERSION) ANNOTATE_CONVERT_FILE = annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) convert -f ofn --output $@.tmp.owl && mv $@.tmp.owl $@ -OTHER_SRC = $(COMPONENTSDIR)/doid.owl $(COMPONENTSDIR)/gard.owl $(COMPONENTSDIR)/icd10cm.owl $(COMPONENTSDIR)/icd10who.owl $(COMPONENTSDIR)/icd11foundation.owl $(COMPONENTSDIR)/ncit.owl $(COMPONENTSDIR)/omim.owl $(COMPONENTSDIR)/ordo.owl +OTHER_SRC = $(COMPONENTSDIR)/doid.owl $(COMPONENTSDIR)/gard.owl $(COMPONENTSDIR)/icd10cm.owl $(COMPONENTSDIR)/icd10who.owl $(COMPONENTSDIR)/icd11foundation.owl $(COMPONENTSDIR)/ncit.owl $(COMPONENTSDIR)/omim.owl $(COMPONENTSDIR)/ordo.owl ONTOLOGYTERMS = $(TMPDIR)/ontologyterms.txt EDIT_PREPROCESSED = $(TMPDIR)/$(ONT)-preprocess.owl diff --git a/src/ontology/mondo-ingest.Makefile b/src/ontology/mondo-ingest.Makefile index 1d8ef5cbb..217e2cb2b 100644 --- a/src/ontology/mondo-ingest.Makefile +++ b/src/ontology/mondo-ingest.Makefile @@ -163,6 +163,22 @@ $(COMPONENTSDIR)/icd10who.owl: $(TMPDIR)/icd10who_relevant_signature.txt | compo remove -T config/properties.txt --select complement --select properties --trim true \ annotate --ontology-iri $(URIBASE)/mondo/sources/icd10who.owl --version-iri $(URIBASE)/mondo/sources/$(TODAY)/icd10who.owl -o $@; fi +# TODO: do +# TODO: remove any unnecessary queries / lines here +# - fix_hgnc_mappings +# - maybe make a comment about other ones i thought to delete +$(COMPONENTSDIR)/icd11.owl: $(TMPDIR)/icd11_relevant_signature.txt | component-download-icd11.owl + if [ $(COMP) = true ] ; then $(ROBOT) remove -i $(TMPDIR)/component-download-icd11.owl.owl --select imports \ + rename --mappings config/property-map-1.sssom.tsv --allow-missing-entities true \ + remove -T $(TMPDIR)/icd11_relevant_signature.txt --select complement --select "classes individuals" --trim false \ + remove -T $(TMPDIR)/icd11_relevant_signature.txt --select individuals \ + query \ + --update ../sparql/fix-labels-with-brackets.ru \ + --update ../sparql/fix_hgnc_mappings.ru \ + --update ../sparql/fix_complex_reification.ru \ + remove -T config/properties.txt --select complement --select properties --trim true \ + annotate --ontology-iri $(URIBASE)/mondo/sources/icd11.owl --version-iri $(URIBASE)/mondo/sources/$(TODAY)/icd11.owl -o $@; fi + .PHONY: component-download-gard.owl component-download-gard.owl: | $(TMPDIR) if [ $(MIR) = true ] && [ $(COMP) = true ]; then $(ROBOT) merge -I https://github.com/monarch-initiative/gard/releases/latest/download/gard.owl \ diff --git a/src/sparql/icd11foundation-relevant-diseases.sparql b/src/sparql/icd11foundation-relevant-diseases.sparql deleted file mode 100644 index e767f914f..000000000 --- a/src/sparql/icd11foundation-relevant-diseases.sparql +++ /dev/null @@ -1,32 +0,0 @@ -PREFIX rdfs: -PREFIX owl: - - -### All diseases -SELECT DISTINCT ?term ?label ?deprecated -WHERE { - { - { - ?s1 ?p1 ?term . - ?term rdfs:subClassOf* . - OPTIONAL { - ?term rdfs:label ?label - } - OPTIONAL { - ?term owl:deprecated ?deprecated - } - } - UNION - { - ?term ?p2 ?o2 . - ?term rdfs:subClassOf* . - OPTIONAL { - ?term rdfs:label ?label - } - OPTIONAL { - ?term owl:deprecated ?deprecated - } - } - } - FILTER(isIRI(?term)) -}