Skip to content

ga4gh/htsget-compliance

Repository files navigation

Build Status Coverage Status License Python 3.12

htsget Compliance

The htsget Compliance Suite determines a web service's compliance with the htsget API specification for serving large alignment and variant datasets. The specification, developed by the Global Alliance for Genomics and Health, serves to provide a standardized, interoperable API framework across different institutions.

Installation

First, required pre-requisites are samtools, bcftools, htsfile and crypt4gh are assumed to be pre-installed in the system, i.e:

apt-get install samtools bcftools tabix uv  (OSX: brew install samtools uv)
uv venv .
pip install crypt4gh

To install htsget-compliance, clone the Github repository, then install via setuptools in a new virtual environment.

Create a new virtual environment:

git clone https://github.com/ga4gh/htsget-compliance.git
cd htsget-compliance

python3 -m venv .venv
source .venv/bin/activate

Install the package:

pip install -e .

Quickstart

Running the following:

htsget-compliance https://htsget.ga4gh-demo.org  | jq '.["summary"]'

Should ideally yield:

{
  "run": 12,
  "passed": 12,
  "warned": 0,
  "failed": 0,
  "skipped": 0
}

Usage

The compliance tests can be run via htsget-compliance ${HTSGET_URL}, where HTSGET_URL is the base url to an htsget service. For example:

htsget-compliance https://htsget.ga4gh-demo.org

Additional commandline options can be specified to:

  • write JSON report to file (-f)
  • change the url path to alignment objects from the default /reads/{id} (-r)
  • change the url path to variant objects from the default /variants/{id} (-v)
  • etc.

A full list of options can be displayed via htsget-compliance --help

Submitting Reports

The report can optionally be submitted to a local or hosted GA4GH Testbed Service with additional commandline options. While running the GA4GH Testbed API, you can submit reports to your local instance with the following:

htsget-compliance https://htsget.ga4gh-demo.org/  -s --submit-id 1edb5213-52a2-434f-a7b8-b101fea8fb30 --submit-token K5pLbwScVu8rEoLLj8pRy5Wv7EXTVahn --testbed-url http://localhost:4500/reports

If the GA4GH Testbed UI is also running you can then see the report displayed on a web UI (ex. http://localhost:4500/).

License

See the LICENSE

Issues

Please raise any issues on Github

About

Compliance testing for htsget deployments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 7