Skip to content

Commit

Permalink
Exact synonym updates (#600)
Browse files Browse the repository at this point in the history
- Update: remaps IAO:0000118 (alt label) to oboInOwl:exactSynonym
- Add: exact_syn_from_label.ru: adds oboInOwl:exactSynonym for all rdfs:label for all non-obsolete terms in components
- Update: component goals to use new query
  • Loading branch information
joeflack4 authored Aug 2, 2024
1 parent 08192ca commit a37945d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ontology/config/property-map.sssom.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ http://www.ebi.ac.uk/efo/definition http://purl.obolibrary.org/obo/IAO_0000115
http://www.ebi.ac.uk/efo/reason_for_obsolescence rdfs:comment
http://www.ebi.ac.uk/efo/alternative_term oboInOwl:hasExactSynonym
http://purl.obolibrary.org/obo/ECO_0000218 oboInOwl:source
http://purl.obolibrary.org/obo/IAO_0000118 oboInOwl:hasExactSynonym
10 changes: 9 additions & 1 deletion src/ontology/mondo-ingest.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ $(COMPONENTSDIR)/omim.owl: $(TMPDIR)/omim_relevant_signature.txt | component-dow
--update ../sparql/fix_omimps.ru \
--update ../sparql/fix-labels-with-brackets.ru \
--update ../sparql/fix_illegal_punning_omim.ru \
--update ../sparql/exact_syn_from_label.ru \
annotate --ontology-iri $(URIBASE)/mondo/sources/omim.owl --version-iri $(URIBASE)/mondo/sources/$(TODAY)/omim.owl -o $@; fi

# todo: See #1 at top of file
Expand All @@ -84,6 +85,7 @@ $(COMPONENTSDIR)/ordo.owl: $(TMPDIR)/ordo_relevant_signature.txt config/properti
--update ../sparql/fix_complex_reification_ordo.ru \
--update ../sparql/fix_xref_prefixes.ru \
--update ../sparql/fix-labels-with-brackets.ru \
--update ../sparql/exact_syn_from_label.ru \
--update ../sparql/ordo-construct-subclass-from-part-of.ru \
--update ../sparql/ordo-construct-subsets.ru \
--update ../sparql/ordo-construct-d2g.ru \
Expand All @@ -95,7 +97,9 @@ $(COMPONENTSDIR)/ordo.owl: $(TMPDIR)/ordo_relevant_signature.txt config/properti
$(COMPONENTSDIR)/ncit.owl: $(TMPDIR)/ncit_relevant_signature.txt | component-download-ncit.owl
if [ $(SKIP_HUGE) = false ] && [ $(COMP) = true ]; then $(ROBOT) remove -i $(TMPDIR)/component-download-ncit.owl.owl --select imports \
rename --mappings config/property-map.sssom.tsv --allow-missing-entities true --allow-duplicates true \
query --update ../sparql/rm_xref_by_prefix.ru \
query \
--update ../sparql/rm_xref_by_prefix.ru \
--update ../sparql/exact_syn_from_label.ru \
remove -T $(TMPDIR)/ncit_relevant_signature.txt --select complement --select "classes individuals" --trim false \
remove -T config/properties.txt --select complement --select properties --trim true \
remove --term "http://purl.obolibrary.org/obo/NCIT_C179199" --axioms "equivalent" \
Expand All @@ -112,6 +116,7 @@ $(COMPONENTSDIR)/doid.owl: $(TMPDIR)/doid_relevant_signature.txt | component-dow
--update ../sparql/fix-labels-with-brackets.ru \
--update ../sparql/rm_xref_by_prefix.ru \
--update ../sparql/fix_make_omim_exact.ru \
--update ../sparql/exact_syn_from_label.ru \
remove -T config/properties.txt --select complement --select properties --trim true \
annotate --ontology-iri $(URIBASE)/mondo/sources/doid.owl --version-iri $(URIBASE)/mondo/sources/$(TODAY)/doid.owl -o $@; fi

Expand All @@ -136,6 +141,7 @@ $(COMPONENTSDIR)/icd10cm.owl: $(TMPDIR)/icd10cm_relevant_signature.txt | compone
query \
--update ../sparql/fix_omimps.ru \
--update ../sparql/fix-labels-with-brackets.ru \
--update ../sparql/exact_syn_from_label.ru \
remove -T config/properties.txt --select complement --select properties --trim true \
annotate --ontology-iri $(URIBASE)/mondo/sources/icd10cm.owl --version-iri $(URIBASE)/mondo/sources/$(TODAY)/icd10cm.owl -o $@; fi

Expand All @@ -148,6 +154,7 @@ $(COMPONENTSDIR)/icd10who.owl: $(TMPDIR)/icd10who_relevant_signature.txt | compo
query \
--update ../sparql/fix_omimps.ru \
--update ../sparql/fix-labels-with-brackets.ru \
--update ../sparql/exact_syn_from_label.ru \
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

Expand All @@ -159,6 +166,7 @@ $(COMPONENTSDIR)/icd11foundation.owl: $(TMPDIR)/icd11foundation_relevant_signatu
remove -T $(TMPDIR)/icd11foundation_relevant_signature.txt --select individuals \
query \
--update ../sparql/fix-labels-with-brackets.ru \
--update ../sparql/exact_syn_from_label.ru \
remove -T config/properties.txt --select complement --select properties --trim true \
annotate --ontology-iri $(URIBASE)/mondo/sources/icd11foundation.owl --version-iri $(URIBASE)/mondo/sources/$(TODAY)/icd11foundation.owl -o $@; fi

Expand Down
11 changes: 11 additions & 0 deletions src/sparql/exact_syn_from_label.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Create an exact synonym copy for all labels
PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

INSERT {
?cls oboInOwl:hasExactSynonym ?label .
} WHERE {
?cls rdfs:label ?label .
FILTER NOT EXISTS { ?cls owl:deprecated ?deprecated . }
}

0 comments on commit a37945d

Please sign in to comment.