Skip to content

Commit

Permalink
Merge pull request #17 from h3abionet/split-synonyms
Browse files Browse the repository at this point in the history
Use oboInOwl:hasExactSynonyms
  • Loading branch information
daniwelter authored Dec 20, 2023
2 parents da71fa9 + 809b8c0 commit 9c5581b
Show file tree
Hide file tree
Showing 7 changed files with 406 additions and 21 deletions.
46 changes: 43 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
src/ontology/tmp/
src/ontology/afpo.json
src/ontology/afpo.obo
.DS_Store
semantic.cache
bin/

*.tmp
*.tmp.obo
*.tmp.owl
*.tmp.json

.github/token.txt

src/ontology/mirror
src/ontology/mirror/*
src/ontology/reports/*
src/ontology/afpo.owl
src/ontology/afpo.obo
src/ontology/afpo.json
src/ontology/afpo-base.*
src/ontology/afpo-basic.*
src/ontology/afpo-full.*
src/ontology/afpo-simple.*
src/ontology/afpo-simple-non-classified.*

src/ontology/seed.txt
src/ontology/dosdp-tools.log
src/ontology/ed_definitions_merged.owl
src/ontology/ontologyterms.txt
src/ontology/simple_seed.txt
src/ontology/patterns
src/ontology/merged-afpo-edit.owl

src/ontology/target/
src/ontology/tmp/*
!src/ontology/tmp/README.md

src/ontology/run.sh.conf
src/ontology/run.sh.env

src/ontology/imports/*_terms_combined.txt

src/patterns/data/**/*.ofn
src/patterns/data/**/*.txt
src/patterns/pattern_owl_seed.txt
src/patterns/all_pattern_terms.txt
23 changes: 19 additions & 4 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ----------------------------------------
# Makefile for afpo
# Generated using ontology-development-kit
# ODK Version: v1.4
# ODK Version: v1.4.3
# ----------------------------------------
# IMPORTANT: DO NOT EDIT THIS FILE. To override default make goals, use afpo.Makefile instead

Expand Down Expand Up @@ -44,7 +44,7 @@ REPORT_PROFILE_OPTS = --profile $(ROBOT_PROFILE)
OBO_FORMAT_OPTIONS =
SPARQL_VALIDATION_CHECKS = owldef-self-reference iri-range label-with-iri multiple-replaced_by
SPARQL_EXPORTS = basic-report class-count-by-prefix edges xrefs obsoletes synonyms
ODK_VERSION_MAKEFILE = v1.4
ODK_VERSION_MAKEFILE = v1.4.3

TODAY ?= $(shell date +%Y-%m-%d)
OBODATE ?= $(shell date +'%d:%m:%Y %H:%M')
Expand Down Expand Up @@ -109,7 +109,7 @@ all_main: $(MAIN_FILES)
# ----------------------------------------


IMPORTS =
IMPORTS = omo

IMPORT_ROOTS = $(patsubst %, $(IMPORTDIR)/%_import, $(IMPORTS))
IMPORT_OWL_FILES = $(foreach n,$(IMPORT_ROOTS), $(n).owl)
Expand Down Expand Up @@ -293,7 +293,7 @@ ALLSEED = $(PRESEED) \
$(IMPORTSEED): $(ALLSEED) | $(TMPDIR)
if [ $(IMP) = true ]; then cat $(ALLSEED) | sort | uniq > $@; fi

ANNOTATION_PROPERTIES=
ANNOTATION_PROPERTIES=rdfs:label IAO:0000115

# ----------------------------------------
# Import modules
Expand All @@ -309,6 +309,12 @@ $(IMPORTDIR)/%_terms_combined.txt: $(IMPORTSEED) $(IMPORTDIR)/%_terms.txt



$(IMPORTDIR)/%_import.owl: $(MIRRORDIR)/%.owl $(IMPORTDIR)/%_terms_combined.txt
if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
extract -T $(IMPORTDIR)/$*_terms_combined.txt --force true --copy-ontology-annotations true --individuals include --method BOT \
query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
$(ANNOTATE_CONVERT_FILE); fi

.PRECIOUS: $(IMPORTDIR)/%_import.owl


Expand Down Expand Up @@ -342,6 +348,15 @@ IMP_LARGE=true # Global parameter to bypass handling of large imports



## ONTOLOGY: omo
.PHONY: mirror-omo
.PRECIOUS: $(MIRRORDIR)/omo.owl
mirror-omo: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/omo.owl --create-dirs -o $(MIRRORDIR)/omo.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/omo.owl -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


$(MIRRORDIR)/%.owl: mirror-% | $(MIRRORDIR)
if [ $(IMP) = true ] && [ $(MIR) = true ] && [ -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
30 changes: 22 additions & 8 deletions src/ontology/afpo-edit.ofn
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Prefix(dcterms:=<http://purl.org/dc/terms/>)


Ontology(<http://purl.obolibrary.org/obo/afpo.owl>
Import(<http://purl.obolibrary.org/obo/afpo/imports/omo_import.owl>)
Annotation(dcterms:contributor <https://orcid.org/0000-0001-5868-4204>)
Annotation(dcterms:contributor <https://orcid.org/0000-0001-8351-264X>)
Annotation(dcterms:contributor <https://orcid.org/0000-0001-8801-5781>)
Expand Down Expand Up @@ -492,7 +493,6 @@ Declaration(Class(<http://purl.obolibrary.org/obo/AfPO_0000580>))
Declaration(ObjectProperty(<http://purl.obolibrary.org/obo/AfPO_0000441>))
Declaration(ObjectProperty(<http://purl.obolibrary.org/obo/AfPO_0000447>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/AfPO_0000089>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/AfPO_0000143>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/AfPO_0000152>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/AfPO_0000221>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/AfPO_0000222>))
Expand Down Expand Up @@ -534,6 +534,7 @@ Declaration(AnnotationProperty(dcterms:title))
Declaration(AnnotationProperty(<http://webprotege.stanford.edu/project/AfPO#language:crossref>))
Declaration(AnnotationProperty(<http://webprotege.stanford.edu/project/AfPO#population:crossref>))
Declaration(AnnotationProperty(<http://www.geneontology.org/formats/oboInOwl#creation_date>))
Declaration(AnnotationProperty(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym>))
Declaration(AnnotationProperty(<http://www.w3.org/2004/02/skos/core#altLabel>))
############################
# Annotation Properties
Expand All @@ -546,10 +547,6 @@ AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#creation_date>
AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/AfPO_0000089> "language:glottolog:wgs84")
SubAnnotationPropertyOf(<http://purl.obolibrary.org/obo/AfPO_0000089> <http://webprotege.stanford.edu/project/AfPO#language:crossref>)

# Annotation Property: <http://purl.obolibrary.org/obo/AfPO_0000143> (synonym)

AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/AfPO_0000143> "synonym")

# Annotation Property: <http://purl.obolibrary.org/obo/AfPO_0000152> (population:genetic:study)

AnnotationAssertion(dcterms:contributor <http://purl.obolibrary.org/obo/AfPO_0000152> <https://orcid.org/0000-0001-9988-3250>)
Expand Down Expand Up @@ -3183,7 +3180,6 @@ SubClassOf(<http://purl.obolibrary.org/obo/AfPO_0000128> ObjectSomeValuesFrom(<h
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000089> <http://purl.obolibrary.org/obo/AfPO_0000131> "Mossi
11°57'N, 1°19'W
11.95, -1.32")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000143> <http://purl.obolibrary.org/obo/AfPO_0000131> "Mooré, Mòoré, Mõõré, Moré, Moshi, Moore, More")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000152> <http://purl.obolibrary.org/obo/AfPO_0000131> <https://www.ncbi.nlm.nih.gov/pubmed/26614524>)
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000221> <http://purl.obolibrary.org/obo/AfPO_0000131> <http://www-01.sil.org/iso639-3/documentation.asp?id=mos>)
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000223> <http://purl.obolibrary.org/obo/AfPO_0000131> <http://glottolog.org/resource/languoid/id/moss1236.bigmap.html>)
Expand Down Expand Up @@ -3217,6 +3213,13 @@ AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000459> <http://purl.o
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000565> <http://purl.obolibrary.org/obo/AfPO_0000131> "Niger-Congo|Atlantic-Congo|Volta-Congo|North|Gur|Central|Northern|Oti-Volta|Western")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000566> <http://purl.obolibrary.org/obo/AfPO_0000131> "moss1236")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000567> <http://purl.obolibrary.org/obo/AfPO_0000131> "mos")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000131> "Moore")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000131> "Mooré")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000131> "More")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000131> "Moré")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000131> "Moshi")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000131> "Mòoré")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000131> "Mõõré")
AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/AfPO_0000131> "Mossi")
SubClassOf(<http://purl.obolibrary.org/obo/AfPO_0000131> <http://purl.obolibrary.org/obo/AfPO_0000151>)
SubClassOf(<http://purl.obolibrary.org/obo/AfPO_0000131> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/AfPO_0000441> <http://purl.obolibrary.org/obo/AfPO_0000310>))
Expand Down Expand Up @@ -6372,7 +6375,6 @@ AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000089> <http://purl.o
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000089> <http://purl.obolibrary.org/obo/AfPO_0000307> "Tedaga
18°03'N, 14°46'E
18.04, 14.77")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000143> <http://purl.obolibrary.org/obo/AfPO_0000307> "Tabu, Tebu, Tebou, Tibu, Tibbu, Toda, Todga, Todaga, Tubu, Tuda, Tudaga, and Umbararo")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000152> <http://purl.obolibrary.org/obo/AfPO_0000307> <https://www.ncbi.nlm.nih.gov/pubmed/27889059>)
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000223> <http://purl.obolibrary.org/obo/AfPO_0000307> <http://glottolog.org/resource/languoid/id/tebu1238.bigmap.html>)
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000230> <http://purl.obolibrary.org/obo/AfPO_0000307> <http://glottolog.org/resource/languoid/id/tebu1238>)
Expand All @@ -6385,6 +6387,18 @@ AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000458> <http://purl.o
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000459> <http://purl.obolibrary.org/obo/AfPO_0000307> "2.25 millions")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000565> <http://purl.obolibrary.org/obo/AfPO_0000307> "Nilo-Saharan|Saharan")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000568> <http://purl.obolibrary.org/obo/AfPO_0000307> <https://www.101lasttribes.com/tribes/toubou.html>)
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Tabu")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Tebou")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Tebu")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Tibbu")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Tibu")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Toda")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Todaga")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Todga")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Tubu")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Tuda")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Tudaga")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000307> "Umbararo")
AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/AfPO_0000307> "Toubou")
SubClassOf(<http://purl.obolibrary.org/obo/AfPO_0000307> <http://purl.obolibrary.org/obo/AfPO_0000265>)
SubClassOf(<http://purl.obolibrary.org/obo/AfPO_0000307> <http://purl.obolibrary.org/obo/AfPO_0000270>)
Expand Down Expand Up @@ -9431,7 +9445,6 @@ AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000089> <http://purl.o
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000089> <http://purl.obolibrary.org/obo/AfPO_0000419> "Etebi
4°47'N, 7°58'E
4.79, 7.97")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000143> <http://purl.obolibrary.org/obo/AfPO_0000419> "Ekid")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000221> <http://purl.obolibrary.org/obo/AfPO_0000419> <http://www-01.sil.org/iso639-3/documentation.asp?id=eke>)
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000223> <http://purl.obolibrary.org/obo/AfPO_0000419> <http://glottolog.org/resource/languoid/id/ekit1245.bigmap.html>)
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000230> <http://purl.obolibrary.org/obo/AfPO_0000419> <http://glottolog.org/resource/languoid/id/ekit1245>)
Expand All @@ -9443,6 +9456,7 @@ AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000458> <http://purl.o
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000459> <http://purl.obolibrary.org/obo/AfPO_0000419> "0.3 millions")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000459> <http://purl.obolibrary.org/obo/AfPO_0000419> "Niger–Congo, Cross River")
AnnotationAssertion(<http://purl.obolibrary.org/obo/AfPO_0000567> <http://purl.obolibrary.org/obo/AfPO_0000419> "eke")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym> <http://purl.obolibrary.org/obo/AfPO_0000419> "Ekid")
AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/AfPO_0000419> "Eket")
SubClassOf(<http://purl.obolibrary.org/obo/AfPO_0000419> <http://purl.obolibrary.org/obo/AfPO_0000277>)
SubClassOf(<http://purl.obolibrary.org/obo/AfPO_0000419> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/AfPO_0000441> <http://purl.obolibrary.org/obo/AfPO_0000033>))
Expand Down
3 changes: 3 additions & 0 deletions src/ontology/afpo-odk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export_formats:
- owl
- obo
- json
import_group:
products:
- id: omo
robot_java_args: "-Xmx8G"
robot_report:
use_labels: TRUE
Expand Down
7 changes: 1 addition & 6 deletions src/ontology/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<group id="Folder Repository, directory=, recursive=false, Auto-Update=false, version=2" prefer="public" xml:base="">






<uri name="http://purl.obolibrary.org/obo/afpo/imports/omo_import.owl" uri="imports/omo_import.owl"/>
</group>
</catalog>
Loading

0 comments on commit 9c5581b

Please sign in to comment.