Skip to content

Commit db2e19d

Browse files
Anita Caronanitacaron
andauthored
rename lib to verificado (#12)
Co-authored-by: Anita Caron <anitacaron@users.noreply.github.com>
1 parent f172a3e commit db2e19d

12 files changed

Lines changed: 29 additions & 4686 deletions

File tree

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Relationship validator [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10557435.svg)](https://doi.org/10.5281/zenodo.10557435)
1+
# Verificado [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10557435.svg)](https://doi.org/10.5281/zenodo.10557435)
22

33

44
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’).
@@ -38,9 +38,9 @@ Then install the `obographviz` package globally:
3838
npm install -g obographviz
3939
```
4040

41-
### `relation-validator` package
41+
### `verificado` package
4242
```bash
43-
pip install relation-validator
43+
pip install verificado
4444
```
4545

4646
## Configure YAML file
@@ -60,18 +60,32 @@ relationships:
6060
filename: path/to/filename.csv
6161
```
6262
63-
The filename can be in TSV or CSV and should have the following columns:
63+
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:
6464
6565
| s | slabel | user_slabel | o | olabel | user_olabel |
6666
|---------------------|---------------------------------------|-------------------------------------------|--------------------|---------------------------------------|-------------------------------------------|
6767
| 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 |
6868
69-
When using CSV, double-quote if the label contains a common.
69+
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.
7070
71-
## Run relation-validator CLI
71+
Add `to_be_parsed: true` to the yaml file when using this type of file.
72+
73+
```yaml
74+
relationships:
75+
sub_class_of: rdfs:subClassOf
76+
part_of: BFO:0000050
77+
connected_to: RO:0001025
78+
has_soma_location: RO:0002100
79+
...
80+
81+
filename: path/to/filename.csv
82+
to_be_parsed: true
83+
```
84+
85+
## Run verificado CLI
7286

7387
```bash
74-
relation-validator validate --input path/to/config.yaml --output path/to/output.csv
88+
verificado validate --input path/to/config.yaml --output path/to/output.csv
7589
```
7690

7791
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.
@@ -81,5 +95,5 @@ The `output.csv` file will be in the same format as the `filename.csv`. It will
8195
To know which ontologies and their version are available in Ubergraph, use the following CLI:
8296

8397
```bash
84-
relation-validator ontologies_version --output filename.json
98+
verificado ontologies_version --output filename.json
8599
```

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[tool.poetry]
2-
name = "relation-validator"
3-
version = "0.5.1"
2+
name = "verificado"
3+
version = "1.0"
44
description = "This package validates a list of relationships between two terms against the specified ontologies."
55
authors = ["Anita Caron <anitac@ebi.ac.uk>"]
66
readme = "README.md"
7-
packages = [{include = "relation_validator", from="src"}]
8-
repository = "https://github.com/INCATools/relation-validator"
7+
packages = [{include = "verificado", from="src"}]
8+
repository = "https://github.com/INCATools/verificado"
99

1010
[tool.poetry.dependencies]
1111
python = "^3.8"
@@ -19,4 +19,4 @@ requires = ["poetry-core"]
1919
build-backend = "poetry.core.masonry.api"
2020

2121
[tool.poetry.scripts]
22-
relation-validator = 'relation_validator.__main__:main'
22+
verificado = 'verificado.__main__:main'

src/relation_validator/conf/obograph-style.json renamed to src/verificado/conf/obograph-style.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"RO:0002176": {
4444
"color": "dodgerblue1",
4545
"label": "connects"
46-
},
46+
},
4747
"not_matched": {
4848
"color": "red"
4949
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pandas import DataFrame
1313
from ruamel.yaml import YAML, YAMLError
1414

15-
from relation_validator import conf as conf_package
15+
from verificado import conf as conf_package
1616

1717
QUERY = """
1818
VALUES (?subject ?object) {{

tests/generic-test.tsv

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)