OpenBIS-Ontology is a small yet powerful ontology designed to semantically model data from the openBIS system. In addition to the ontology specification, the repository includes a Python-based parser that converts JSON output from the openBIS API into semantic data (e.g., RDF) ready for further integration or querying.
The automatically generated Ontology documentation by PyLODE is available here:
Many research groups and laboratories use openBIS for managing complex datasets. However, bridging the gap between raw API outputs and semantic technologies (like linked data and RDF) can be challenging. OpenBIS-Ontology addresses this by:
- Defining a Domain Ontology: Formalizing the entities, relationships, and concepts inherent to openBIS.
- Providing a Python Parser: Transforming JSON data from the openBIS API into semantic data conforming to the ontology.
- Enabling Data Integration: Allowing users to integrate openBIS data into semantic web applications, enhancing interoperability and reusability.
- Ontology Definition: An easy-to-extend ontology that encapsulates key openBIS entities.
- Python-Based Parser: A tool to convert JSON from openBIS API outputs to RDF or other semantic formats.
- Extensibility: Simple integration mechanisms to expand the ontology or update the parser for custom use cases.
- Validation & Testing: Unit tests to ensure robust data conversion and ontology compliance.
- Python 3.6 or later
- Pip
-
Clone the repository:
git clone https://github.com/Mat-O-Lab/OpenBIS-Ontology.git cd OpenBIS-Ontology
-
Create and activate a virtual environment (recommended):
python3 -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
To convert JSON output from the openBIS API into semantic data using the parser:
-
Place your JSON file in the
examples/
directory (or specify the path to your file). -
Run the parser:
python parser/openbis_parser.py --input examples/sample.json --output examples/sample.rdf
-
The generated semantic data (e.g., in RDF format) will be available at the specified output location.
The parser supports the following command-line options:
--input
: Path to the input JSON file.--output
: Path where the converted output will be saved.- (Optional) Additional flags for verbose logging or custom mapping configurations.
For detailed information on usage and configuration, refer to the script’s internal help:
python parser/openbis_parser.py --help
Contributions are welcome! If you wish to enhance or extend the functionality:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes and push to your branch.
- Open a pull request describing your changes.
To run the provided tests:
pytest tests/
Ensure that any new changes maintain compatibility with the existing ontology and parser functionality.
Contributions, issues, and feature requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.
For questions, bug reports, or further discussions, please open an issue on GitHub or contact the repository maintainers.
- openBIS for the inspiration behind the data management efforts.
- All contributors and the open-source community for their valuable input and collaboration.