Skip to content

Commit

Permalink
Merge pull request #32 from mcwdsi/fix-units
Browse files Browse the repository at this point in the history
Fix problems with clinical drug strength units
  • Loading branch information
jamesaoverton authored Jul 25, 2024
2 parents 5787d54 + a4d25bb commit 1cb7ad6
Show file tree
Hide file tree
Showing 18 changed files with 44,465 additions and 18,753 deletions.
2 changes: 2 additions & 0 deletions docs/odk-workflows/RepositoryFileStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ These are the current imports in DRON
| ro | http://purl.obolibrary.org/obo/ro.owl | slme |
| apollo_sv | http://purl.obolibrary.org/obo/apollo_sv.owl | None |
| go | http://purl.obolibrary.org/obo/go.owl | None |
| iao | http://purl.obolibrary.org/obo/iao.owl | None |
| obi | http://purl.obolibrary.org/obo/obi.owl | None |
| uo | http://purl.obolibrary.org/obo/uo.owl | custom |
| ogms | http://purl.obolibrary.org/obo/ogms.owl | None |
| bfo | http://purl.obolibrary.org/obo/bfo.owl | slme |
| omo | http://purl.obolibrary.org/obo/omo.owl | mirror |
Expand Down
24 changes: 22 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= c15ccab5eeab92844591b6c33e398db0bdeaa3b472273506368bae37fe44271e
CONFIG_HASH= 082560e7167e4c838bb11575d493a5b738d1886fb5b1721258c2e706584f371f


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


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

IMPORT_ROOTS = $(patsubst %, $(IMPORTDIR)/%_import, $(IMPORTS))
IMPORT_OWL_FILES = $(foreach n,$(IMPORT_ROOTS), $(n).owl)
Expand Down Expand Up @@ -393,6 +393,10 @@ $(IMPORTDIR)/ro_import.owl: $(MIRRORDIR)/ro.owl $(IMPORTDIR)/ro_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: uo

$(IMPORTDIR)/uo_import.owl: $(MIRRORDIR)/uo.owl
echo "ERROR: You have configured your default module type to be custom; this behavior needs to be overwritten in dron.Makefile!" && false
## Module for ontology: bfo

$(IMPORTDIR)/bfo_import.owl: $(MIRRORDIR)/bfo.owl $(IMPORTDIR)/bfo_terms_combined.txt
Expand Down Expand Up @@ -511,6 +515,14 @@ mirror-go: | $(TMPDIR)
$(ROBOT) convert -i $(TMPDIR)/go-download.owl -o $(TMPDIR)/$@.owl


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


## ONTOLOGY: obi
.PHONY: mirror-obi
.PRECIOUS: $(MIRRORDIR)/obi.owl
Expand All @@ -519,6 +531,14 @@ mirror-obi: | $(TMPDIR)
$(ROBOT) convert -i $(TMPDIR)/obi-download.owl -o $(TMPDIR)/$@.owl


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


## ONTOLOGY: ogms
.PHONY: mirror-ogms
.PRECIOUS: $(MIRRORDIR)/ogms.owl
Expand Down
2 changes: 2 additions & 0 deletions src/ontology/catalog-v001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<uri name="http://purl.obolibrary.org/obo/dron/imports/go_import.owl" uri="imports/go_import.owl"/>
<uri name="http://purl.obolibrary.org/obo/dron/imports/obi_import.owl" uri="imports/obi_import.owl"/>
<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/dron-chebi.owl" uri="components/dron-chebi.owl"/>-->

Expand Down
2 changes: 2 additions & 0 deletions src/ontology/dron-edit.owl
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ Import(<http://purl.obolibrary.org/obo/dron/imports/apollo_sv_import.owl>)
Import(<http://purl.obolibrary.org/obo/dron/imports/bfo_import.owl>)
Import(<http://purl.obolibrary.org/obo/dron/imports/chebi_import.owl>)
Import(<http://purl.obolibrary.org/obo/dron/imports/go_import.owl>)
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/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>)
Annotation(dcterms:creator "Eric Joseph")
Annotation(dcterms:creator "Josh Hanna")
Annotation(dcterms:creator "Mathias Brochhausen")
Expand Down
3 changes: 3 additions & 0 deletions src/ontology/dron-odk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ import_group:
slme_individuals: exclude
- id: apollo_sv
- id: go
- id: iao
- id: obi
- id: uo
module_type: custom
- id: ogms
- id: bfo
module_type: slme
Expand Down
14 changes: 13 additions & 1 deletion src/ontology/dron.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
## If you need to customize your Makefile, make
## changes here rather than in the main Makefile

##########################
#### Custom UO Import ####
##########################

$(IMPORTDIR)/uo_import.owl: $(MIRRORDIR)/uo.owl $(IMPORTDIR)/uo_terms_combined.txt
if [ $(IMP) = true ]; then $(ROBOT) merge -i $< \
query --update ../sparql/preprocess-module.ru \
remove --base-iri "$(OBOBASE)/UO_" --axioms external --preserve-structure false --trim false \
extract --method MIREOT --upper-term UO:0000000 $(patsubst %, --lower-term %, $(ANNOTATION_PROPERTIES)) --lower-terms $(IMPORTDIR)/uo_terms_combined.txt \
query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
$(ANNOTATE_CONVERT_FILE); fi

##################################
#### Custom release artefacts ####
##################################
Expand Down Expand Up @@ -33,7 +45,7 @@ $(TMPDIR)/ldtab.jar: | $(TMPDIR)
LDTAB := java -jar $(TMPDIR)/ldtab.jar

# Load DrOn templates into SQLite.
$(TMPDIR)/dron.db: $(SCRIPTSDIR)/create-dron-tables.sql $(SCRIPTSDIR)/load-dron-tables.sql $(SCRIPTSDIR)/index-dron-tables.sql
$(TMPDIR)/dron.db: $(SCRIPTSDIR)/create-dron-tables.sql $(SCRIPTSDIR)/load-dron-tables.sql $(SCRIPTSDIR)/index-dron-tables.sql $(TEMPLATEDIR)/*.tsv
rm -f $@
sqlite3 $@ < $<
sqlite3 $@ < $(word 2,$^)
Expand Down
6 changes: 6 additions & 0 deletions src/ontology/imports/external_import.owl
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ Declaration(ObjectProperty(<http://purl.obolibrary.org/obo/RO_0000057>))
Declaration(ObjectProperty(<http://purl.obolibrary.org/obo/RO_0002211>))
Declaration(DataProperty(<http://purl.obolibrary.org/obo/OBI_0001937>))
Declaration(NamedIndividual(<http://purl.obolibrary.org/obo/UO_0000022>))
Declaration(NamedIndividual(<http://purl.obolibrary.org/obo/UO_0000040>))
Declaration(NamedIndividual(<http://purl.obolibrary.org/obo/UO_0000098>))
Declaration(NamedIndividual(<http://purl.obolibrary.org/obo/UO_0000176>))
Declaration(NamedIndividual(<http://purl.obolibrary.org/obo/UO_0000187>))
Declaration(NamedIndividual(<http://purl.obolibrary.org/obo/UO_0000201>))
Declaration(NamedIndividual(<http://purl.obolibrary.org/obo/UO_0010073>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/BFO_0000179>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/BFO_0000180>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/IAO_0000111>))
Expand Down
Loading

0 comments on commit 1cb7ad6

Please sign in to comment.