Skip to content

Commit

Permalink
Merge pull request #252 from obophenotype/swisslipid-import
Browse files Browse the repository at this point in the history
Add Swisslipid import to OBA
  • Loading branch information
rays22 authored Jun 26, 2023
2 parents 528d08c + 7c54e46 commit 54c6838
Show file tree
Hide file tree
Showing 16 changed files with 6,420 additions and 505 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ src/ontology/run.sh.env
/oba-baseplus.*
*.db
*.gz
src/ontology/imports/lipidmaps_import.owl
src/ontology/imports/swisslipids_import.owl
7 changes: 7 additions & 0 deletions docs/editors-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ When creating new OBA terms using DOSDP patterns for example the [entity-attribu

Sometimes, a new term you are using in a DOSDP pattern is *not yet* in a slim. So you will have to *refresh* the slim first.

### Refresh LIPID Maps

LIPID map is currently (03.06.2023) not imported, but curated manually, because https://www.lipidmaps.org/resources/sparql does not work. To update the LIPID maps imports, you have to

- Add a LIPID term to https://github.com/obophenotype/bio-attribute-ontology/blob/master/src/templates/external.tsv
- When refreshing the imports in the usual way, this TSV file (a ROBOT template) is built in place of a proper LIPID MAPS mirror.

### Refresh PRO Slim:

*Note*: you will need at least 32 GB RAM for this
Expand Down
2 changes: 2 additions & 0 deletions docs/odk-workflows/RepositoryFileStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ These are the current imports in OBA
| so | http://purl.obolibrary.org/obo/so.owl | None |
| po | http://purl.obolibrary.org/obo/po.owl | None |
| bfo | http://purl.obolibrary.org/obo/bfo.owl | None |
| swisslipids | http://purl.obolibrary.org/obo/swisslipids.owl | None |
| lipidmaps | http://purl.obolibrary.org/obo/lipidmaps.owl | None |

## 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
28 changes: 22 additions & 6 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ----------------------------------------
# Makefile for oba
# Generated using ontology-development-kit
# ODK Version: v1.4
# ODK Version: v1.4.1
# ----------------------------------------
# IMPORTANT: DO NOT EDIT THIS FILE. To override default make goals, use oba.Makefile instead

Expand Down Expand Up @@ -44,7 +44,7 @@ REPORT_PROFILE_OPTS = --profile $(ROBOT_PROFILE)
OBO_FORMAT_OPTIONS =
SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference
SPARQL_EXPORTS = basic-report
ODK_VERSION_MAKEFILE = v1.4
ODK_VERSION_MAKEFILE = v1.4.1

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


IMPORTS = ro chebi goplus go pato omo hp mondo ncbitaxon uberon cl nbo pr so po bfo
IMPORTS = ro chebi goplus go pato omo hp mondo ncbitaxon uberon cl nbo pr so po bfo swisslipids lipidmaps

IMPORT_ROOTS = $(IMPORTDIR)/merged_import
IMPORT_OWL_FILES = $(foreach n,$(IMPORT_ROOTS), $(n).owl)
Expand Down Expand Up @@ -506,8 +506,10 @@ mirror-uberon: | $(TMPDIR)
.PHONY: mirror-cl
.PRECIOUS: $(MIRRORDIR)/cl.owl
mirror-cl: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/cl/cl-base.owl --create-dirs -o $(MIRRORDIR)/cl.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/cl.owl -o $@.tmp.owl && mv $@.tmp.owl $(TMPDIR)/$@.owl; fi
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/cl.owl --create-dirs -o $(MIRRORDIR)/cl.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/cl.owl -o $@.tmp.owl && \
$(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/CL --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


## ONTOLOGY: nbo
Expand Down Expand Up @@ -556,6 +558,20 @@ mirror-bfo: | $(TMPDIR)
$(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/BFO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


## ONTOLOGY: swisslipids
.PHONY: mirror-swisslipids
.PRECIOUS: $(MIRRORDIR)/swisslipids.owl
$(MIRRORDIR)/swisslipids.owl:
echo "ERROR: You have configured your default mirror type to be custom; this behavior needs to be overwritten in oba.Makefile!" && false


## ONTOLOGY: lipidmaps
.PHONY: mirror-lipidmaps
.PRECIOUS: $(MIRRORDIR)/lipidmaps.owl
$(MIRRORDIR)/lipidmaps.owl:
echo "ERROR: You have configured your default mirror type to be custom; this behavior needs to be overwritten in oba.Makefile!" && false

ALL_MIRRORS = $(patsubst %, $(MIRRORDIR)/%.owl, $(IMPORTS))
MERGE_MIRRORS = true

Expand Down Expand Up @@ -667,7 +683,7 @@ DOSDP_PATTERN_NAMES_DEFAULT = $(strip $(patsubst %.tsv,%, $(notdir $(wildcard $(
$(DOSDP_OWL_FILES_DEFAULT): $(EDIT_PREPROCESSED) $(DOSDP_TSV_FILES_DEFAULT) $(ALL_PATTERN_FILES)
if [ $(PAT) = true ] && [ "${DOSDP_PATTERN_NAMES_DEFAULT}" ]; then $(DOSDPT) generate --catalog=catalog-v001.xml \
--infile=$(PATTERNDIR)/data/default/ --template=$(PATTERNDIR)/dosdp-patterns --batch-patterns="$(DOSDP_PATTERN_NAMES_DEFAULT)" \
--ontology=$< --obo-prefixes=true --outfile=$(PATTERNDIR)/data/default; fi
--ontology=$< --obo-prefixes=true --prefixes=config/prefixes.yaml --outfile=$(PATTERNDIR)/data/default; fi


# Generate template file seeds
Expand Down
4 changes: 2 additions & 2 deletions src/ontology/components/obsoletes.owl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/oba/components/obsoletes.owl>
<http://purl.obolibrary.org/obo/oba/releases/2023-06-16/components/obsoletes.owl>
Annotation(owl:versionInfo "2023-06-16")
<http://purl.obolibrary.org/obo/oba/releases/2023-06-23/components/obsoletes.owl>
Annotation(owl:versionInfo "2023-06-23")

Declaration(Class(<http://purl.obolibrary.org/obo/OBA_0000037>))
Declaration(Class(<http://purl.obolibrary.org/obo/OBA_0000039>))
Expand Down
4 changes: 2 additions & 2 deletions src/ontology/components/synonyms.owl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/oba/components/synonyms.owl>
<http://purl.obolibrary.org/obo/oba/releases/2023-06-16/components/synonyms.owl>
Annotation(owl:versionInfo "2023-06-16")
<http://purl.obolibrary.org/obo/oba/releases/2023-06-23/components/synonyms.owl>
Annotation(owl:versionInfo "2023-06-23")

Declaration(Class(<http://purl.obolibrary.org/obo/OBA_0002546>))
Declaration(Class(<http://purl.obolibrary.org/obo/OBA_0002565>))
Expand Down
2 changes: 2 additions & 0 deletions src/ontology/config/prefixes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LM: "https://bioregistry.io/lipidmaps:"
SLM: "https://swisslipids.org/rdf/SLM_"
3 changes: 3 additions & 0 deletions src/ontology/imports/lipidmaps_terms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
LM:LMST03020077
LM:LMPK12010207
LM:LMSP00000010
Loading

0 comments on commit 54c6838

Please sign in to comment.