Schema validation for evidence submitted to Open Targets

opentargets, bioinformatics, python3
pip install opentargets-validator==1.0.0


PyPI version Build Status codecov

Open Targets JSON validator

The opentargets-validator tool in this repository validates JSON files which are submitted to Open Targets by various data sources against the Open Targets JSON schemas.


pip install --upgrade opentargets-validator

Usage examples

Validating a local gzipped file against the latest schema version from GitHub:

opentargets_validator \
  --schema \

Validating a portion of the local file against a local copy of the schema:

zcat evidence.json.gz | head -n 100 | opentargets_validator --schema evidence_schema.json

Input files

The validator has to be provided with two inputs:

  1. Data to validate. It has to contain exactly one complete JSON object per line.
  2. Schema to validate against. It can be any valid JSON Draft 7 schema.

Either of the input files (data and schema) can be read from:

Development instructions

An editable copy can be installed within a virtual environment:

python -m venv env
source env/bin/activate
pip install -e ".[dev]"

The tests can be run with:

python -m pytest --cov=opentargets_validator --cov-report term tests/ --fulltrace

Note that you should always use python -m pytest and not pytest, because the latter might invoke a system-wide installation (if you have any) and cause incorrect test results.

This repository has Travis integration and CodeCov integration.

Releases are put on PyPI automatically via Travis from GitHub tags.