Skip to main content

hlaont

Confidence-aware, full-field HLA typing from Oxford Nanopore (ONT) R10 long reads, designed for population-scale sequencing.

Hlaont does the following:

  • Types 41 HLA/MIC/TAP genes.
  • Estimates copy number per gene rather than assuming diploidy at every locus.
  • Reports C4A/C4B total copy number and long/short-form composition (the complement C4 segmental duplication).
  • Flags novel alleles (novel:intronic, novel:utr, novel:synonymous, novel:nonsynonymous, novel:null, extension).
  • Accepts FASTQ or BAM/CRAM input, and can use real read-backed phase (HP/PS tags) when available.

Requirements

  • Python ≥ 3.11
  • minimap2 and samtools on PATH (external CLI tools, not pip-installable — install via conda/bioconda: conda install -c bioconda minimap2 samtools)

Installation

# from source
git clone https://github.com/aleixcanalda/hlaont.git
cd hlaont
pip install -e .

# or, once published:
# pip install hlaont
# conda install -c bioconda hlaont

First-time setup

The package ships the anchor set, models and a pre-extracted assembly bundle, but the template pool is built from IPD-IMGT/HLA once before hlaont run will work:

hlaont update-db --db-dir hlaont_db/   # downloads IPD-IMGT/HLA and builds the pool into hlaont_db/
hlaont run SAMPLE_ID reads.fastq --db-dir hlaont_db/ --out-dir OUT/

--db-dir can also be set once with export HLAONT_DB=hlaont_db/; without either, the pool lives inside the installed package.

hlaont update-anchors --db-dir hlaont_db/ rebuilds the anchor set against a new pool (maintainers only; needs cd-hit-est on PATH).

Usage

# FASTQ input
hlaont run SAMPLE_ID reads.fastq --out-dir OUT/

# BAM/CRAM input (region set auto-derived from the @SQ header — no build/reference flag needed)
hlaont run SAMPLE_ID --bam aligned.bam --out-dir OUT/
hlaont run SAMPLE_ID --bam aligned.cram --reference ref.fa --out-dir OUT/

# Use real read-backed phase (HP/PS tags), when the input BAM has them
hlaont run SAMPLE_ID --bam phased.bam --phased --out-dir OUT/

Each run writes, into --out-dir:

file contents
{sample}.calls.tsv one row per haplotype call: gene, copy number, nearest allele, novelty tag, per-field GQ, read support, consensus QV
{sample}.consensus.fa + .consensus.qv.tsv the polished per-haplotype consensus sequence and its per-base quality
{sample}.variants.vcf variants relative to the nearest catalogued allele
{sample}.qc.json per-gene copy-number estimates, C4 form breakdown, phasing routing (if --phased), and failure reasons for any gene that couldn't be called

Run hlaont run --help, hlaont update-db --help, or hlaont update-anchors --help for the full flag list.

License

hlaont's own code is MIT — see LICENSE. The distributed package also contains Badread's error model (GPL-3.0-only), so the package as a whole is MIT AND GPL-3.0-only.

resources/anchors/vendor/ ports a 136-allele anchor set from FuFiHLA (MIT); resources/models/vendor/ ports an ONT R10.4.1 error model from Badread (GPLv3). See each NOTICE.md/license file for full attribution. If you use hlaont, please also cite FuFiHLA (10.1093/bioinformatics/btag231).

Metadata

Release files for hlaont 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hlaont 0.1.0
File Size Uploaded
hlaont-0.1.0.tar.gz 4.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for hlaont 0.1.0
File Interpreter ABI Platform
hlaont-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 MB

Release files / hlaont-0.1.0.tar.gz

Download URL hlaont-0.1.0.tar.gz
Size 4.0 MB
Tags Source
SHA-256 checksum
How to use checksums
2a7defca2551963e0466f6a5582aa06fe9f8f711867c9c64a8a93070f16cbec0
BLAKE2b-256 checksum
How to use checksums
e7277beb82a47d34451b98d52e438c7e67293ef27fea31959377f811b475506f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / hlaont-0.1.0-py3-none-any.whl

Download URL hlaont-0.1.0-py3-none-any.whl
Size 4.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
51c9773ac9e0fb4aee7e25743302eb267594a449b3d51877cdce5976a8f48701
BLAKE2b-256 checksum
How to use checksums
64d8af54b958d3b70d1a6b5086c239471dbacd0a78694128ff9051bddfd4f74e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page