Skip to content

Commit

Permalink
rename lib to verificado (#12)
Browse files Browse the repository at this point in the history
Co-authored-by: Anita Caron <[email protected]>
  • Loading branch information
Anita Caron and anitacaron authored Jun 12, 2024
1 parent f172a3e commit db2e19d
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 4,686 deletions.
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Relationship validator [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10557435.svg)](https://doi.org/10.5281/zenodo.10557435)
# Verificado [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10557435.svg)](https://doi.org/10.5281/zenodo.10557435)


Validate ontology relationships using [Ubergraph](https://zenodo.org/record/7249759#.ZDRuZOzML1c) 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’).
Expand Down Expand Up @@ -38,9 +38,9 @@ Then install the `obographviz` package globally:
npm install -g obographviz
```

### `relation-validator` package
### `verificado` package
```bash
pip install relation-validator
pip install verificado
```

## Configure YAML file
Expand All @@ -60,18 +60,32 @@ relationships:
filename: path/to/filename.csv
```
The filename can be in TSV or CSV and should have the following columns:
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 |
When using CSV, double-quote if the label contains a common.
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](tests/test-generic.tsv) in the tests directory.
## Run relation-validator CLI
Add `to_be_parsed: true` to the yaml file when using this type of file.

```yaml
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

```bash
relation-validator validate --input path/to/config.yaml --output path/to/output.csv
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.
Expand All @@ -81,5 +95,5 @@ The `output.csv` file will be in the same format as the `filename.csv`. It will
To know which ontologies and their version are available in Ubergraph, use the following CLI:

```bash
relation-validator ontologies_version --output filename.json
verificado ontologies_version --output filename.json
```
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tool.poetry]
name = "relation-validator"
version = "0.5.1"
name = "verificado"
version = "1.0"
description = "This package validates a list of relationships between two terms against the specified ontologies."
authors = ["Anita Caron <[email protected]>"]
readme = "README.md"
packages = [{include = "relation_validator", from="src"}]
repository = "https://github.com/INCATools/relation-validator"
packages = [{include = "verificado", from="src"}]
repository = "https://github.com/INCATools/verificado"

[tool.poetry.dependencies]
python = "^3.8"
Expand All @@ -19,4 +19,4 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
relation-validator = 'relation_validator.__main__:main'
verificado = 'verificado.__main__:main'
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"RO:0002176": {
"color": "dodgerblue1",
"label": "connects"
},
},
"not_matched": {
"color": "red"
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pandas import DataFrame
from ruamel.yaml import YAML, YAMLError

from relation_validator import conf as conf_package
from verificado import conf as conf_package

QUERY = """
VALUES (?subject ?object) {{
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion tests/generic-test.tsv

This file was deleted.

2,393 changes: 0 additions & 2,393 deletions tests/ref-organ-relations.csv

This file was deleted.

2,277 changes: 0 additions & 2,277 deletions tests/test-results.csv

This file was deleted.

0 comments on commit db2e19d

Please sign in to comment.