Skip to content

MaastrichtU-IDS/semanticscience

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

725 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semanticscience Integrated Ontology (SIO)

SIO provides a simple, integrated ontology of types and relations for rich description of objects, processes, and their attributes. See the overview, design principles, design patterns, and the published paper.

Ontology

The OWL2 ontology is available at http://semanticscience.org/ontology/sio.owl

Subsets are available for modular import:

Browse the ontology:

SIO term resolution is handled by Ontobee:

Community

Questions: sio-ontology mailing list (sio-ontology@googlegroups.com)
Term requests: issue tracker

Projects using SIO:

Development

Setup

Python 3.8+ is required.

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Scripts

scripts/bump_version.py — Increment the ontology version

Updates owl:versionInfo in ontology/sio.owl and sets dct:modified to today's date.

python3 scripts/bump_version.py            # bump minor version (default): 1.59 -> 1.60
python3 scripts/bump_version.py --major    # bump major version:           1.59 -> 2.0
python3 scripts/bump_version.py --patch    # bump patch version:           1.59 -> 1.59.1
python3 scripts/bump_version.py --set 2.0  # set an explicit version
python3 scripts/bump_version.py --dry-run  # preview without writing

scripts/generate_subsets.py — Generate subset OWL files

Reads ontology/sio.owl and writes subset files to ontology/sio/release/. Replaces ontology/generatesubsets.php.

python3 scripts/generate_subsets.py

Output files:

File Description
sio-subset-<name>.owl Per-subset ontology derived from sio:subset annotations
sio-subset-camelcase-label.owl All terms with URIs derived from camelCase labels
sio-subset-dash-labels.owl All terms with URIs derived from dash-separated labels
sio-subset-labels.owl Copy of sio-subset-dash-labels.owl
sio-release.owl Full versioned release with rdfs:isDefinedBy and owl:versionIRI

Subset membership is controlled by the sio:subset annotation property. The value supports suffix modifiers:

Suffix Meaning
name Include this term only
name+ Include this term and all descendants (transitive rdfs:subClassOf)
name++ Include this term, all descendants, and all ancestors
name- Exclude this term and all descendants

scripts/diff_ontologies.py — Compare two ontology versions

Reports ontology-level annotation changes and added, removed, or modified classes, properties, and individuals between two OWL files.

python3 scripts/diff_ontologies.py <ontology1> <ontology2> [--format text|json]
  • Inputs can be local file paths or URLs
  • Default output is human-readable text; --format json produces machine-readable output
  • Tracks: labels, definitions (dct:description), comments, deprecation, synonyms, subClassOf, equivalentClass, domain, range, inverseOf, disjointWith, and more
# Compare working file against a previous release
python3 scripts/diff_ontologies.py ontology/sio.owl ontology/sio/release/sio-release.owl

# Save diff as JSON
python3 scripts/diff_ontologies.py ontology/sio.owl ontology/sio-new.owl --format json > diff.json

About

The Semanticscience Integrated Ontology (SIO) provides a simple, integrated ontology of types and relations for rich description of objects, processes and their attributes.

Topics

Resources

Stars

Watchers

Forks

Contributors