#obo #validation #ontology #command-line-tool #file-format

bin+lib fastobo-validator

Faultess validation tool for OBO products

17 releases

0.4.6 Sep 26, 2022
0.4.4 Feb 21, 2022
0.4.0 Dec 1, 2020
0.3.0 Aug 6, 2020
0.2.2 Jul 23, 2019

#242 in Science

MIT license

385KB
9K SLoC

fastobo-validator Star me

Faultess validation tool for OBO products.

Actions License Source Binaries Crate Changelog GitHub issues

Overview

fastobo-validator is a command-line tool to validate an OBO file in format version 1.4 against the latest specification.

Setup

fastobo-validator is distributed as a pre-built binary for the following platforms:

Simply download the archive, and unpack the fastobo-validator binary somewhere in your $PATH. For other OS (notably Windows), you'll need to build the binary from source. Make sure to have the Rust compiler installed (check the installation methods) and simply run cargo install fastobo-validator to install the binary in your $CARGO_HOME folder.

Validation

Mandatory

Syntax

The syntax of the OBO format version 1.4 has been made more restrictive compared to the format version 1.2, but files produces by modern tools (such as ROBOT) should already be compliant with this version.

Cardinality

Certain clauses (such as name or def) can only occur a fixed number of times within a frame. fastobo-validator will check for the number of occurences of those in the input document.

Optional

ISBN validation (-I / --ISBN)

ISBN identifiers embed a validation digit which can be used to validate a given code without querying an external database. Enabling this validation check will process all ISBN-prefixed identifiers for a valid ISBN. It will not check ISBN10 or ISBN13-prefixed identifiers.

Frame duplication (-d / --duplicates)

While not forbidden by the OBO syntax and semantics, having frames with the same ID in an OBO document is often an error. Use this flag to verify all frames in the input have a unique identifier.

Obsoletion clauses (-O / --obsoletion)

Some clauses, such as consider or replaced_by, can only occur in frames for entities that have been made obsolete. Use this flag to check this is the case.

All check (--all)

Enable all optional validation. Note that using this parameter in an automated context, such as a CI workflow, means that your file may not pass validation if you update fastobo-validator after extra checks have been added. It is recommended you only use this flag when running the binary yourself.

Usage

Simply run the binary against one or more OBO files:

$ fastobo-validator go.obo

The validator will then parse and validate each OBO product, and return with a non-null error code if any error was detected, displaying a small report for each error.

Feedback

Found a bug ? Have an enhancement request ? Head over to the GitHub issue tracker of the project if you need to report or ask something. If you are filling in on a bug, please include as much information as you can about the issue, and try to recreate the same bug in a simple, easily reproducible situation.

About

This project was developed by Martin Larralde as part of a Master's Degree internship in the BBOP team of the Lawrence Berkeley National Laboratory, under the supervision of Chris Mungall. Cite this project as:

Larralde M. Developing Python and Rust libraries to improve the ontology ecosystem [version 1; not peer reviewed]. F1000Research 2019, 8(ISCB Comm J):1500 (poster) (https://doi.org/10.7490/f1000research.1117405.1)

Dependencies

~6–16MB
~178K SLoC