Skip to main content

HIV Resistance Interpretation and Visualization System

Project description

HyRISE - HIV Resistance Interpretation & Scoring Engine

HyRISE Logo

A tool for HIV drug resistance analysis and visualization developed by the National Microbiology Laboratory, Public Health Agency of Canada

Build Status Coverage Python Versions PyPI Downloads License

Overview

HyRISE (HIV Resistance Interpretation & Scoring Engine) is a command-line tool for HIV drug resistance interpretation and reporting.

It supports two primary workflows:

  1. process: convert Sierra JSON results into MultiQC custom content (*_mqc.json, *_mqc.html), with optional report generation.
  2. sierra: run SierraLocal on FASTA input and optionally chain directly into process.

The CLI is deterministic by default (no implicit interactive mode), with optional guided mode via --interactive.

Installation

PyPI

pip install hyrise

Optional report dependency:

pip install "hyrise[report]"

From Source

git clone https://github.com/phac-nml/HyRISE
cd HyRISE
pip install -e .

Conda Environment

conda create -n hyrise python=3.11
conda activate hyrise
pip install hyrise

Quickstart

Use de-identified fixtures from example_data/public/.

1) Process a Sierra JSON file

hyrise process -i example_data/public/DEMO_IN_NGS_results.json --out out

2) Process IN + PRRT together

hyrise process \
  example_data/public/DEMO_IN_NGS_results.json \
  example_data/public/DEMO_PRRT_NGS_results.json \
  --out out

3) FASTA to Sierra JSON, then process

hyrise sierra example_data/public/DEMO_IN_NGS.fasta --process --process-dir out

Command Summary

  • hyrise process: process Sierra JSON into report-ready outputs.
  • hyrise sierra: run SierraLocal on FASTA input.
  • hyrise container: pull/build/extract container assets.
  • hyrise resources: update/list HIVdb resource files.
  • hyrise check-deps: show native/container dependency status.

Help:

hyrise --help
python -m hyrise --help
hyrise process --help
hyrise sierra --help
hyrise container --help
hyrise resources --help
hyrise check-deps --help

Python API

HyRISE is CLI-first. For Python usage, keep imports explicit:

from hyrise.core.processor import process_files

Stable top-level API is intentionally minimal:

import hyrise
print(hyrise.__version__)

Inputs and Outputs

Accepted Inputs

  • process: one or more Sierra JSON files
  • sierra: one or more FASTA files

Outputs

  • *_mqc.json
  • *_mqc.html
  • optional MultiQC report output when --run-multiqc is enabled

Container Workflows

Recommended on HPC: pull prebuilt image

hyrise container --pull --output hyrise.sif --image ghcr.io/phac-nml/hyrise:latest
hyrise process -i example_data/public/DEMO_IN_NGS_results.json --out out --container --container-path ./hyrise.sif

Build Apptainer/Singularity image locally from pip-installed assets

hyrise container --extract-def container_build
apptainer build hyrise.sif container_build/hyrise.def
# or: singularity build hyrise.sif container_build/hyrise.def

Build Docker image from pip-installed assets

hyrise container --extract-dockerfile container_build
docker build -f container_build/Dockerfile -t hyrise:local container_build
docker run --rm -v "$PWD:/data" hyrise:local --help

Build Docker image from repository source

docker build -f src/hyrise/Dockerfile -t hyrise:local .

Private Registry Note

If the repository is private but the package is published on PyPI, pip install hyrise still works without repository access.

Container pull depends on registry access:

  • public registry image: no extra credentials required
  • private registry image: users must authenticate
  • offline or restricted environments: provide a local .sif and use --container-path

Interactive Mode

Interactive mode is explicit and optional:

hyrise --interactive
hyrise process --interactive
hyrise sierra --interactive
hyrise container --interactive
hyrise check-deps --interactive

Configuration

Configuration precedence:

  1. CLI flags
  2. config file
  3. optional environment overrides
  4. built-in defaults

Default config path:

~/.config/hyrise/config.toml

Example:

[container]
path = "/path/to/hyrise.sif"
runtime = "apptainer"
search_paths = ["/shared/containers/hyrise.sif"]

[resources]
dir = "/path/to/hyrise/resources"

Resource Updates and Offline Behavior

  • Normal analysis runs do not download resources.
  • Downloads occur only when explicitly requested:
    • hyrise resources --update-hivdb
    • hyrise resources --update-apobec
    • hyrise resources --update-all
  • After resource update, hyrise sierra automatically prefers the newest downloaded HIVDB_*.xml when default --xml is used.
hyrise resources --list
hyrise resources --update-hivdb

Troubleshooting

Missing sierralocal

  • Install natively: pip install sierralocal post-align
  • Or use container mode: hyrise sierra <input.fasta> --container --container-path /path/to/hyrise.sif
  • For HPC: apptainer pull hyrise.sif docker://ghcr.io/phac-nml/hyrise:latest

Missing multiqc

Install optional report dependency:

pip install "hyrise[report]"

Container runtime not found

Install Apptainer/Singularity, or pass an explicit runtime with --container-runtime.

Compatibility

  • Python: 3.9, 3.10, 3.11, 3.12
  • Container runtimes: Apptainer and Singularity
  • Entry points: hyrise and python -m hyrise

Citing HyRISE

If you use HyRISE in your research, please cite it as follows:

Osahan, G., Ji, H., et al. (2026). HyRISE: HIV Resistance Interpretation & Scoring Engine — A pipeline for HIV drug resistance analysis and visualization. National Microbiology Laboratory, Public Health Agency of Canada. https://github.com/phac-nml/hyrise

For BibTeX:

@software{hyrise_2026,
  author       = {Osahan, Gurasis and Ji, Hezhao},
  title        = {HyRISE: HIV Resistance Interpretation \& Scoring Engine — A pipeline for HIV drug resistance analysis and visualization},
  year         = {2026},
  publisher    = {Public Health Agency of Canada},
  version      = {0.2.0},
  url          = {https://github.com/phac-nml/hyrise},
  organization = {National Microbiology Laboratory, Public Health Agency of Canada},
}

License

HyRISE is distributed under the GNU General Public License v3.0. Refer to the GNU GPL v3.0 for the full terms and conditions.

Support and Contact

  • Issue Tracking: Report issues and feature requests on your project tracker
  • Email Support: Gurasis Osahan

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyrise-0.2.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyrise-0.2.0-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file hyrise-0.2.0.tar.gz.

File metadata

  • Download URL: hyrise-0.2.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for hyrise-0.2.0.tar.gz
Algorithm Hash digest
SHA256 eb4ecc5f860b32d22647af4dab01ed5643ee4b7c0b96b3577d60e13ea68ab864
MD5 f1e2fcf1913953c239bfcca1c71d0d32
BLAKE2b-256 60f3ef9c5e1075767612ca6b341a85dbdbc105cc4d2da2b2c037b9ef1d0bdb90

See more details on using hashes here.

File details

Details for the file hyrise-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: hyrise-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for hyrise-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4cdeef338a4499640879fd5dba2eccff26967bc1f3ea933a71cb163ca35d1e8
MD5 3f846eb57c728e4b76a93a69e6bfc144
BLAKE2b-256 c164863a551051b469f627dd4ca5aa90205c76dfc3fd2109aeb30b4ad34365fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page