Peptide-based HLA typing from immunopeptidomics data
Project description
Peptide-based HLA typing from immunopeptidomics data
immunotype predicts HLA class I alleles directly from immunopeptidomics data โ no separate HLA typing experiment needed. immunotype combines a graph neural network with a curated mono-allelic lookup table in an ensemble model, achieving 87.2% accuracy at protein-level resolution across diverse human tissues.
๐ Quick Start
Installation
# Core CLI functionality
pip install immunotype
Command Line Interface
Usage: immunotype [OPTIONS] PEPTIDE_INPUT TYPING_OUTPUT
Predict HLA typing from immunopeptide sequences.
This tool uses graph neural networks and lookup tables to predict HLA allele typing from immunopeptidomics data. Provide a peptide input file and optionally customize the HLA alleles to consider.
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ * PEPTIDE_INPUT PATH TSV input file. Either a single column of peptides or two columns with sample IDs and peptides. [required] โ
โ * TYPING_OUTPUT PATH Path to save the typing output. [required] โ
โ --prob-output PATH Save detailed HLA probabilities to specified TSV file. โ
โ --hla-input PATH Path to the HLA input file containing alleles to consider. [default: <immunotype-package-path>/data/selected_alleles.csv] โ
โ --max-n-peptides INTEGER Maximum number of peptides to predict at once. [default: 50000] โ
โ --batch-size INTEGER How many samples should be predicted simultaneously. [default: 1] โ
โ --prediction-model [ensemble|gnn|lookup] Select which model to use. [default: ensemble] โ
โ --use-gpu Run prediction on GPU instead of CPU. โ
โ --version Show the version and exit. โ
โ --help Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
# Basic prediction
immunotype src/immunotype/examples/single_sample_input.tsv test_single_sample_typing.tsv
# With probability details
immunotype src/immunotype/examples/single_sample_input.tsv test_single_sample_typing.tsv --prob-output test_single_sample_probabilities.tsv
# Custom settings
immunotype src/immunotype/examples/single_sample_input.tsv test_single_sample_typing.tsv --batch-size 100 --prediction-model gnn
# Explore all CLI options
immunotype --help
App Interface
# Install with app dependencies
pip install immunotype[app]
# Run the Gradio app
immunotype-app
Python API
import pandas as pd
from immunotype import predict
# Prepare data
peptides = pd.DataFrame({
'peptide': ['ALDGRETD', 'ASDSGKYL'],
'sample': ['sample1', 'sample1']
})
alleles = pd.DataFrame({
'allele': ['HLA-A*02:01', 'HLA-B*07:02', 'HLA-C*07:02']
})
# Make predictions
predictions, typing = predict(
peptide_df=peptides,
allele_df=alleles
)
๐ฅ Input Formats
Single-column peptides:
ALDGRETD
ASDSGKYL
AVDPTSGQ
Multi-sample format:
sample peptide
1 ALDGRETD
1 ASDSGKYL
2 AVDPTSGQ
๐ค Output
Typing (default): Top 2 alleles per locus (A, B, C) per sample.
sample typing
sample_0 HLA-A*32:01;HLA-A*68:01;HLA-B*15:01;HLA-B*44:02;HLA-C*03:03;HLA-C*07:04
Probabilities (--prob-output): Per-allele scores from each prediction mode.
sample locus allele probability_gnn probability_lookup probability
sample_0 A HLA-A*01:01 0.0005 0.0000 0.0003
sample_0 A HLA-A*02:01 0.0000 0.1945 0.0584
๐ Authors
- Matteo Pilz
- Jonas Scheid
๐ Citation
@software{immunotype,
title={immunotype: Peptide-based HLA typing from immunopeptidomics data},
author={Pilz, Matteo and Scheid, Jonas},
url={https://github.com/AG-Walz/immunotype},
year={2026}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file immunotype-1.0.2.tar.gz.
File metadata
- Download URL: immunotype-1.0.2.tar.gz
- Upload date:
- Size: 30.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7412f9d343c4a8b386ecbd698176e1056f930701e61d98986ad76ecbf0cb407
|
|
| MD5 |
601df5f4e6cabd631cbd7d358848341f
|
|
| BLAKE2b-256 |
1a756c54949b368ba258a8d010b8abf6c631021bb6bc133d7b994340a121debe
|
Provenance
The following attestation bundles were made for immunotype-1.0.2.tar.gz:
Publisher:
release.yml on AG-Walz/immunotype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
immunotype-1.0.2.tar.gz -
Subject digest:
a7412f9d343c4a8b386ecbd698176e1056f930701e61d98986ad76ecbf0cb407 - Sigstore transparency entry: 1204779579
- Sigstore integration time:
-
Permalink:
AG-Walz/immunotype@b7c2a0982c96e6caf23578e98117e1938009c338 -
Branch / Tag:
refs/tags/1.0.2 - Owner: https://github.com/AG-Walz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b7c2a0982c96e6caf23578e98117e1938009c338 -
Trigger Event:
release
-
Statement type:
File details
Details for the file immunotype-1.0.2-py3-none-any.whl.
File metadata
- Download URL: immunotype-1.0.2-py3-none-any.whl
- Upload date:
- Size: 30.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d37aaaf54076baa45774c68f4e75217c621558a7676e8a5f0ea7e8b7402f759
|
|
| MD5 |
6a0f53371391ca3414ad4411c0733b48
|
|
| BLAKE2b-256 |
3feeb0209e9a39769b7c06c5d145328bff1e6a9b3970814362b7a90a6f44ef72
|
Provenance
The following attestation bundles were made for immunotype-1.0.2-py3-none-any.whl:
Publisher:
release.yml on AG-Walz/immunotype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
immunotype-1.0.2-py3-none-any.whl -
Subject digest:
0d37aaaf54076baa45774c68f4e75217c621558a7676e8a5f0ea7e8b7402f759 - Sigstore transparency entry: 1204779617
- Sigstore integration time:
-
Permalink:
AG-Walz/immunotype@b7c2a0982c96e6caf23578e98117e1938009c338 -
Branch / Tag:
refs/tags/1.0.2 - Owner: https://github.com/AG-Walz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b7c2a0982c96e6caf23578e98117e1938009c338 -
Trigger Event:
release
-
Statement type: