This package validates a list of relationships between two terms against the specified ontologies.
Project description
Verificado
Validate ontology relationships using Ubergraph as source of truth. Relationships in this context may be subClassOf axioms between names classes (e.g. 'lymphocyte' subClassOf 'cell') or existential restrictions, (e.g. 'enterocyte' part_of some ‘intestinal epithelium’).
Ubergraph is an RDF triplestore with 39 OBO ontologies merged, precomputed OWL classification and materialised class relationship from existential property restrictions. Validation therefore works for any directly asserted or inferred/indirect subClassOf relationship or existential restriction.
Install
Dependencies
This package depends on Graphviz and OBOGraphviz to represent the validation as a graph.
Graphviz
On macOS:
brew install graphviz
On Linux:
apt install graphviz
For another platform, please follow this instruction to install Graphviz.
OBOGraphviz
Before installing OBOGraphviz, make sure you have installed Node.js version >= 14.16. Please follow this instructions to install Node and npm.
Then install the obographviz
package globally:
npm install -g obographviz
verificado
package
pip install verificado
Configure YAML file
In the config file, it is defined the list of relationships the validation should run on. The order is essential.
The yaml file needs to have the keys relationships
and filename
. Check an example below:
relationships:
sub_class_of: rdfs:subClassOf
part_of: BFO:0000050
connected_to: RO:0001025
has_soma_location: RO:0002100
...
filename: path/to/filename.csv
The filename can be in TSV or CSV. When using CSV, double-quote if the label contains a common. It's preferred to have the following columns:
s | slabel | user_slabel | o | olabel | user_olabel |
---|---|---|---|---|---|
the subject term ID | the label of the term in the column s | optional label for the term given by user | the object term ID | the label of the term in the column s | optional label for the term given by user |
However, the package can also accept TSV or CSV files representing a hierarchy. You can specify an undetermined number of levels, each level defined with an ontology term ID and the label of the term. Please check an example in the tests directory.
Add to_be_parsed: true
to the yaml file when using this type of file.
relationships:
sub_class_of: rdfs:subClassOf
part_of: BFO:0000050
connected_to: RO:0001025
has_soma_location: RO:0002100
...
filename: path/to/filename.csv
to_be_parsed: true
Run verificado CLI
verificado validate --input path/to/config.yaml --output path/to/output.csv
The output.csv
file will be in the same format as the filename.csv
. It will return the cases where a triple (subject, relationship, object) with the relationships listed in the yaml file was not found in Ubergraph.
List of ontologies available
To know which ontologies and their version are available in Ubergraph, use the following CLI:
verificado ontologies_version --output filename.json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file verificado-1.0.tar.gz
.
File metadata
- Download URL: verificado-1.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.16 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9416bac7a4c99735bb489898d3fd4a5c09dd4701f1737845bfa72ad88c13749f |
|
MD5 | b0bd856f195d3bce20a15c2a32700fb2 |
|
BLAKE2b-256 | 076fa395581462b0963bee5140543723024e412f3f04018c4f47d6e95728fff7 |
File details
Details for the file verificado-1.0-py3-none-any.whl
.
File metadata
- Download URL: verificado-1.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.16 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8970befb994743f7cde25bffad48ec3629b21fda9cd8a2d4392ce58a21b2c5e0 |
|
MD5 | f501f5a9d19a800457f8d8b586afd139 |
|
BLAKE2b-256 | 8cc0fbefda61d0e218e692935c563a6e2e4467dd429366a86d81fa671f7d7df0 |