Metadata-Version: 2.3
Name: mhctyper
Version: 0.1.5
Summary: MHC Class I and II typer based on polysolver algorithm.
Project-URL: Source, https://github.com/svm-zhang/mhctyper
Project-URL: Documentation, https://svm-zhang.github.io/mhctyper/
Project-URL: Issues, https://github.com/svm-zhang/mhctyper/issues
Author-email: Simo Zhang <svm.zhang@gmail.com>
Maintainer-email: Simo Zhang <svm.zhang@gmail.com>
License: MIT
Keywords: HLA typing,bioinformatics,genomics,sequencing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: numpy>=2.1.1
Requires-Dist: polars>=1.7.0
Requires-Dist: pysam>=0.22.1
Requires-Dist: tinyscibio>=0.4.1
Requires-Dist: tqdm>=4.66.5
Description-Content-Type: text/markdown

# mhctyper

[![PyPI version](https://img.shields.io/pypi/v/mhctyper)](https://pypi.org/project/mhctyper/)
![Python versions](https://img.shields.io/pypi/pyversions/mhctyper)
[![PyPI Downloads](https://img.shields.io/pypi/dm/mhctyper)](https://pypistats.org/packages/mhctyper)
![License](https://img.shields.io/pypi/l/mhctyper)

Polars-accelerated MHC class I and II typing based on Polysolver algorithm.

## Features

- Supports both class I and II typing with good
  [accuracy](https://github.com/svm-zhang/hla_benchmark?tab=readme-ov-file)
- Runtime speedup boosted by polars
- Minimum I/O operations
- Easy integration to workflow/pipeline with better CLI and proper packaging.

## Installation

mhctyper can be installed from PyPI:

```bash
pip install mhctyper
```

## Quick start

`mhctyper` simply requires 2 inputs:

- Alignment to HLA alleles in BAM format: `$bam`.
- Population frequency from the original `polysolver`: `HLA_FREQ.txt`.

```bash
mhctyper --bam "$bam" \
    --freq "HLA_FREQ.txt" \
    --outdir "$outdir" \
    --nproc 8
```

Please refer to [documentation](https://svm-zhang.github.io/mhctyper) for more details.
