https://github.com/vemonet/semanticscience-model
LinkML model for the SemanticScience Integrated Ontology
https://github.com/vemonet/semanticscience-model
knowledge-graph ontology owl-ontology semanticscience shacl shex
Last synced: 3 months ago
JSON representation
LinkML model for the SemanticScience Integrated Ontology
- Host: GitHub
- URL: https://github.com/vemonet/semanticscience-model
- Owner: vemonet
- Created: 2021-12-03T11:16:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-15T22:16:25.000Z (over 3 years ago)
- Last Synced: 2025-01-10T14:21:40.491Z (5 months ago)
- Topics: knowledge-graph, ontology, owl-ontology, semanticscience, shacl, shex
- Language: Python
- Homepage: https://vemonet.github.io/semanticscience-model
- Size: 7.34 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🔬 SemanticScience Integrated Ontology
[](https://github.com/vemonet/semanticscience-model/actions/workflows/main.yaml)
The Semanticscience Integrated Ontology (**SIO**) provides a simple, integrated ontology of types and relations for rich description of objects, processes and their attributes.
This repository uses the [LinkML](https://github.com/linkml/linkml) modelling language to implement the [SIO ontology](https://semanticscience.org).
The LinkML model for SIO is defined in [`model/sio-model.yaml`](https://github.com/vemonet/semanticscience-model/blob/main/model/sio-model.yaml)
📖 The documentation generated by LinkML is available at https://vemonet.github.io/semanticscience-model
## 📥️ Install
Requirement: Python >= 3.7
Pipenv is required to build the files from the LinkML models:
```bash
pip install pipenv
```Install LinkML with `pipenv`:
```bash
pipenv install linkml
```Make sure the `make` command is available, on Debian/Ubuntu you can install it with:
```bash
sudo apt-get install -y build-essential
```## 📦️ Build model files
Generate all artefacts from the YAML model in the `semanticscience_model` folder (OWL, SHACL, ShEx, JSON-LD context, Python classes...):
```bash
make
```Generate a specific artefact, for example with SHACL, and ignore the cache:
```bash
make gen-shacl -B
```Generate the model documentation in the `docs` folder:
```bash
make docs
```Clean the `target` folder:
```bash
make clean
```> Check the `Makefile` file if you need to make changes to the process.
## 💬 Autocomplete for the model YAML
For **VisualStudio Code** users: you can add autocomplete and validation for LinkML model files in VisualStudio Code easily with the [YAML extension from RedHat](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml).
1. Go to VisualStudio Code, and open the **Command Palette** in the **View** menu, or with `Ctrl+Shift+P`
2. Search for **`Open Settings (JSON)`**
3. Then add the following lines to the `settings.json` :
```json
"yaml.schemas": {
"https://raw.githubusercontent.com/vemonet/semanticscience-model/master/resources/linkml.schema.json": ["model/*-model.yml"],
}
```## 🔧 Use a custom LinkML installation
You might want to bring improvements to the LinkML schema generation and use this new version. To do so, clone the LinkML repo in the parent directory of `semanticscience-model`, and install LinkML from this repository:
```bash
cd ..
git clone https://github.com/linkml/linkml
cd semanticscience-model
pipenv install ../linkml
```## 🦉 Convert OWL to LinkML
⚠️ Work in progress, not all SIO has been defined in this LinkML model, we are still missing:
* Data Properties and Annotation Properties
* Advanced semantic such as inverse or symmetricGo to the `owl_to_linkml` folder, and install the dependencies to convert OWL to LinkML:
```bash
cd owl_to_linkml
pip install -r requirements.txt
```Then run the notebook `owl_to_linkml.ipynb`
> Note: a similar work has been done to convert OWL directly to RML https://github.com/oeg-dataintegration/owl2rml
## 🔗 Links
LinkML docs: https://linkml.io/linkml/intro/tutorial01.html
LinkML template repo: https://github.com/linkml/linkml-model-template
Example LinkML model: https://github.com/biolink/biolink-model