Skip to content

Commit

Permalink
Merge pull request #46 from mcwdsi/fix-pato-import
Browse files Browse the repository at this point in the history
fixes #44 by making PATO import a separate ODK (filter) import. Makin…
  • Loading branch information
hoganwr authored Dec 24, 2024
2 parents 7f0f99e + a9a2b86 commit 555cc58
Show file tree
Hide file tree
Showing 18 changed files with 141 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ jobs:
- name: Run ontology QC checks
env:
DEFAULT_BRANCH: main
run: echo "DRON in its current form is too big for GitHub Actions"
run: echo "DrOn in its current form is too big for GitHub Actions."

1 change: 1 addition & 0 deletions docs/odk-workflows/RepositoryFileStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ These are the current imports in DRON
| omo | http://purl.obolibrary.org/obo/omo.owl | mirror |
| chebi | http://purl.obolibrary.org/obo/chebi.owl | slme |
| pr | http://purl.obolibrary.org/obo/pr.owl | slme |
| pato | http://purl.obolibrary.org/obo/pato.owl | filter |

## Components
Components, in contrast to imports, are considered full members of the ontology. This means that any axiom in a component is also included in the ontology base - which means it is considered _native_ to the ontology. While this sounds complicated, consider this: conceptually, no component should be part of more than one ontology. If that seems to be the case, we are most likely talking about an import. Components are often not needed for ontologies, but there are some use cases:
Expand Down
22 changes: 20 additions & 2 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# 3. [Update repo to latest ODK](update_repo)

# Fingerprint of the configuration file when this Makefile was last generated
CONFIG_HASH= 082560e7167e4c838bb11575d493a5b738d1886fb5b1721258c2e706584f371f
CONFIG_HASH= 19da4684159be042a50f7d4b9fa0ec9d7698d4c5d70529e63b99f62140d7e4a1


# ----------------------------------------
Expand Down Expand Up @@ -165,7 +165,7 @@ all_main: $(MAIN_FILES)
# ----------------------------------------


IMPORTS = ro apollo_sv go iao obi uo ogms bfo omo chebi pr
IMPORTS = ro apollo_sv go iao obi uo ogms bfo omo chebi pr pato

IMPORT_ROOTS = $(patsubst %, $(IMPORTDIR)/%_import, $(IMPORTS))
IMPORT_OWL_FILES = $(foreach n,$(IMPORT_ROOTS), $(n).owl)
Expand Down Expand Up @@ -425,6 +425,16 @@ $(IMPORTDIR)/pr_import.owl: $(MIRRORDIR)/pr.owl $(IMPORTDIR)/pr_terms_combined.t
query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
$(ANNOTATE_CONVERT_FILE); fi

## Module for ontology: pato

$(IMPORTDIR)/pato_import.owl: $(MIRRORDIR)/pato.owl $(IMPORTDIR)/pato_terms_combined.txt
if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
extract -T $(IMPORTDIR)/pato_terms_combined.txt --copy-ontology-annotations true --force true --method BOT \
remove --base-iri http://purl.obolibrary.org/obo/PATO_ --axioms external --preserve-structure false --trim false \
remove $(patsubst %, --term %, $(ANNOTATION_PROPERTIES)) --term rdfs:label --term IAO:0000115 -T $(IMPORTDIR)/pato_terms_combined.txt --select complement \
query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
$(ANNOTATE_CONVERT_FILE); fi


.PHONY: refresh-imports
refresh-imports:
Expand Down Expand Up @@ -589,6 +599,14 @@ mirror-pr:
endif


## ONTOLOGY: pato
.PHONY: mirror-pato
.PRECIOUS: $(MIRRORDIR)/pato.owl
mirror-pato: | $(TMPDIR)
curl -L $(OBOBASE)/pato.owl --create-dirs -o $(TMPDIR)/pato-download.owl --retry 4 --max-time 200 && \
$(ROBOT) convert -i $(TMPDIR)/pato-download.owl -o $(TMPDIR)/$@.owl


$(MIRRORDIR)/%.owl: mirror-% | $(MIRRORDIR)
if [ -f $(TMPDIR)/mirror-$*.owl ]; then if cmp -s $(TMPDIR)/mirror-$*.owl $@ ; then echo "Mirror identical, ignoring."; else echo "Mirrors different, updating." &&\
cp $(TMPDIR)/mirror-$*.owl $@; fi; fi
Expand Down
2 changes: 1 addition & 1 deletion src/ontology/catalog-v001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<uri name="http://purl.obolibrary.org/obo/dron/imports/ogms_import.owl" uri="imports/ogms_import.owl"/>
<uri name="http://purl.obolibrary.org/obo/dron/imports/iao_import.owl" uri="imports/iao_import.owl"/>
<uri name="http://purl.obolibrary.org/obo/dron/imports/uo_import.owl" uri="imports/uo_import.owl"/>

<uri name="http://purl.obolibrary.org/obo/dron/imports/pato_import.owl" uri="imports/pato_import.owl"/>
<!-- <uri name="http://purl.obolibrary.org/obo/dron/dron-chebi.owl" uri="components/dron-chebi.owl"/>-->

<!-- <uri name="http://purl.obolibrary.org/obo/dron/dron-hand.owl" uri="components/dron-hand.owl"/>-->
Expand Down
24 changes: 18 additions & 6 deletions src/ontology/dron-edit.owl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Import(<http://purl.obolibrary.org/obo/dron/imports/iao_import.owl>)
Import(<http://purl.obolibrary.org/obo/dron/imports/obi_import.owl>)
Import(<http://purl.obolibrary.org/obo/dron/imports/ogms_import.owl>)
Import(<http://purl.obolibrary.org/obo/dron/imports/omo_import.owl>)
Import(<http://purl.obolibrary.org/obo/dron/imports/pato_import.owl>)
Import(<http://purl.obolibrary.org/obo/dron/imports/pr_import.owl>)
Import(<http://purl.obolibrary.org/obo/dron/imports/ro_import.owl>)
Import(<http://purl.obolibrary.org/obo/dron/imports/uo_import.owl>)
Expand Down Expand Up @@ -342,23 +343,23 @@ Declaration(AnnotationProperty(<http://www.geneontology.org/formats/oboInOwl#sho

AnnotationAssertion(rdfs:label <http://www.geneontology.org/formats/oboInOwl#hasAlternativeId> "has_alternative_id")

# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasDbXref> (has cross-reference)
# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasDbXref> (database_cross_reference)

AnnotationAssertion(rdfs:label <http://www.geneontology.org/formats/oboInOwl#hasDbXref> "database_cross_reference")

# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> (has exact synonym)
# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> (has_exact_synonym)

AnnotationAssertion(rdfs:label <http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> "has_exact_synonym")

# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym> (has narrow synonym)
# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym> (has_narrow_synonym)

AnnotationAssertion(rdfs:label <http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym> "has_narrow_synonym")

# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasOBONamespace> (has_obo_namespace)

AnnotationAssertion(rdfs:label <http://www.geneontology.org/formats/oboInOwl#hasOBONamespace> "has_obo_namespace")

# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym> (has related synonym)
# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym> (has_related_synonym)

AnnotationAssertion(rdfs:label <http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym> "has_related_synonym")

Expand Down Expand Up @@ -454,7 +455,7 @@ SubClassOf(<http://purl.obolibrary.org/obo/CHEBI_135198> ObjectSomeValuesFrom(<h

SubClassOf(<http://purl.obolibrary.org/obo/CHEBI_135556> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/RO_0000053> <http://purl.obolibrary.org/obo/DRON_00000072>))

# Class: <http://purl.obolibrary.org/obo/CHEBI_135621> (metaclazepam)
# Class: <http://purl.obolibrary.org/obo/CHEBI_135621> (Metaclazepam hydrochloride)

SubClassOf(<http://purl.obolibrary.org/obo/CHEBI_135621> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/RO_0000053> <http://purl.obolibrary.org/obo/DRON_00000072>))

Expand Down Expand Up @@ -2061,6 +2062,7 @@ AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#inSubset> <htt
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#inSubset> <http://purl.obolibrary.org/obo/GO_0005488> <http://purl.obolibrary.org/obo/go#goslim_pir>)
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#inSubset> <http://purl.obolibrary.org/obo/GO_0005488> <http://purl.obolibrary.org/obo/go#goslim_plant>)
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#inSubset> <http://purl.obolibrary.org/obo/GO_0005488> <http://purl.obolibrary.org/obo/go#gosubset_prok>)
SubClassOf(<http://purl.obolibrary.org/obo/GO_0005488> <http://purl.obolibrary.org/obo/GO_0008150>)
# Class: <http://purl.obolibrary.org/obo/GO_0005515> (protein binding)
Expand Down Expand Up @@ -2106,6 +2108,11 @@ AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000114> <http://purl.ob
# Class: <http://purl.obolibrary.org/obo/IAO_0000009> (datum label)
AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000114> <http://purl.obolibrary.org/obo/IAO_0000009> <http://purl.obolibrary.org/obo/IAO_0000122>)
SubClassOf(<http://purl.obolibrary.org/obo/IAO_0000009> <http://purl.obolibrary.org/obo/IAO_0000030>)
# Class: <http://purl.obolibrary.org/obo/IAO_0000030> (information content entity)
SubClassOf(<http://purl.obolibrary.org/obo/IAO_0000030> <http://purl.obolibrary.org/obo/BFO_0000031>)
# Class: <http://purl.obolibrary.org/obo/OBI_0000011> (planned process)
Expand All @@ -2127,11 +2134,16 @@ AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000114> <http://purl.ob
SubClassOf(<http://purl.obolibrary.org/obo/OGMS_0000090> <http://purl.obolibrary.org/obo/OBI_0000011>)
# Class: <http://purl.obolibrary.org/obo/PATO_0000125> (<http://purl.obolibrary.org/obo/PATO_0000125>)
# Class: <http://purl.obolibrary.org/obo/PATO_0000125> (mass)
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#inSubset> <http://purl.obolibrary.org/obo/PATO_0000125> <http://purl.obolibrary.org/obo/pato#attribute_slim>)
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#inSubset> <http://purl.obolibrary.org/obo/PATO_0000125> <http://purl.obolibrary.org/obo/pato#relational_slim>)
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#inSubset> <http://purl.obolibrary.org/obo/PATO_0000125> <http://purl.obolibrary.org/obo/pato#scalar_slim>)
SubClassOf(<http://purl.obolibrary.org/obo/PATO_0000125> <http://purl.obolibrary.org/obo/PATO_0000001>)
# Class: <http://purl.obolibrary.org/obo/UO_0000000> (unit)
SubClassOf(<http://purl.obolibrary.org/obo/UO_0000000> <http://purl.obolibrary.org/obo/IAO_0000030>)
############################
Expand Down
4 changes: 4 additions & 0 deletions src/ontology/dron-odk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ import_group:
module_type: slme
is_large: TRUE
use_gzipped: TRUE
- id: pato
module_type: filter
base_iris:
- http://purl.obolibrary.org/obo/PATO_
components:
products:
- filename: dron-ingredient.owl
Expand Down
6 changes: 3 additions & 3 deletions src/ontology/imports/apollo_sv_import.owl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/dron/imports/apollo_sv_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-20/imports/apollo_sv_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-22/imports/apollo_sv_import.owl>
Annotation(<http://purl.org/dc/elements/1.1/source> <http://purl.obolibrary.org/obo/apollo_sv/releases/2024-08-15/apollo_sv.owl>)
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version 20AA_241202F")
Annotation(owl:versionInfo "2024-12-20")
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version ")
Annotation(owl:versionInfo "2024-12-22")

Declaration(Class(<http://purl.obolibrary.org/obo/APOLLO_SV_00000145>))
Declaration(Class(<http://purl.obolibrary.org/obo/APOLLO_SV_00000335>))
Expand Down
6 changes: 3 additions & 3 deletions src/ontology/imports/bfo_import.owl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/dron/imports/bfo_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-20/imports/bfo_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-22/imports/bfo_import.owl>
Annotation(<http://purl.org/dc/elements/1.1/source> <http://purl.obolibrary.org/obo/bfo/2019-08-26/bfo.owl>)
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version 20AA_241202F")
Annotation(owl:versionInfo "2024-12-20")
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version ")
Annotation(owl:versionInfo "2024-12-22")

Declaration(Class(<http://purl.obolibrary.org/obo/BFO_0000001>))
Declaration(Class(<http://purl.obolibrary.org/obo/BFO_0000002>))
Expand Down
6 changes: 3 additions & 3 deletions src/ontology/imports/go_import.owl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/dron/imports/go_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-20/imports/go_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-22/imports/go_import.owl>
Annotation(<http://purl.org/dc/elements/1.1/source> <http://purl.obolibrary.org/obo/go/releases/2024-11-03/go.owl>)
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version 20AA_241202F")
Annotation(owl:versionInfo "2024-12-20")
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version ")
Annotation(owl:versionInfo "2024-12-22")

Declaration(Class(<http://purl.obolibrary.org/obo/GO_0003008>))
Declaration(Class(<http://purl.obolibrary.org/obo/GO_0005488>))
Expand Down
6 changes: 3 additions & 3 deletions src/ontology/imports/iao_import.owl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/dron/imports/iao_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-20/imports/iao_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-22/imports/iao_import.owl>
Annotation(<http://purl.org/dc/elements/1.1/source> <http://purl.obolibrary.org/obo/iao/2022-11-07/iao.owl>)
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version 20AA_241202F")
Annotation(owl:versionInfo "2024-12-20")
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version ")
Annotation(owl:versionInfo "2024-12-22")

Declaration(Class(<http://purl.obolibrary.org/obo/IAO_0000003>))
Declaration(Class(<http://purl.obolibrary.org/obo/IAO_0000009>))
Expand Down
6 changes: 3 additions & 3 deletions src/ontology/imports/obi_import.owl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/dron/imports/obi_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-20/imports/obi_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-22/imports/obi_import.owl>
Annotation(<http://purl.org/dc/elements/1.1/source> <http://purl.obolibrary.org/obo/obi/2024-12-05/obi.owl>)
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version 20AA_241202F")
Annotation(owl:versionInfo "2024-12-20")
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version ")
Annotation(owl:versionInfo "2024-12-22")

Declaration(Class(<http://purl.obolibrary.org/obo/BFO_0000015>))
Declaration(Class(<http://purl.obolibrary.org/obo/BFO_0000040>))
Expand Down
6 changes: 3 additions & 3 deletions src/ontology/imports/ogms_import.owl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/dron/imports/ogms_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-20/imports/ogms_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-22/imports/ogms_import.owl>
Annotation(<http://purl.org/dc/elements/1.1/source> <http://purl.obolibrary.org/obo/ogms/2021-08-19/ogms.owl>)
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version 20AA_241202F")
Annotation(owl:versionInfo "2024-12-20")
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version ")
Annotation(owl:versionInfo "2024-12-22")

Declaration(Class(<http://purl.obolibrary.org/obo/OGMS_0000090>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/IAO_0000115>))
Expand Down
6 changes: 3 additions & 3 deletions src/ontology/imports/omo_import.owl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/dron/imports/omo_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-20/imports/omo_import.owl>
<http://purl.obolibrary.org/obo/dron/releases/2024-12-22/imports/omo_import.owl>
Annotation(<http://purl.org/dc/elements/1.1/source> <http://purl.obolibrary.org/obo/omo/releases/2024-11-13/omo.owl>)
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version 20AA_241202F")
Annotation(owl:versionInfo "2024-12-20")
Annotation(rdfs:comment "This version of DrOn is current through RxNorm version ")
Annotation(owl:versionInfo "2024-12-22")

Declaration(Class(<http://purl.obolibrary.org/obo/IAO_0000027>))
Declaration(Class(<http://purl.obolibrary.org/obo/IAO_0000030>))
Expand Down
Loading

0 comments on commit 555cc58

Please sign in to comment.