MHC-I anchor position predictor using allele-specific PWMs
Project description
AnchorMiner — MHC-I Anchor Position Predictor
Anchor residues are amino acids within a peptide that form direct contacts with the MHC-I binding groove. They serve a structural docking function rather than defining T cell recognition, making their identification useful for immunogenicity modeling, epitope masking, and feature engineering in machine learning pipelines.
AnchorMiner identifies canonical and non-canonical anchor positions for a given peptide and MHC-I allele using allele-specific Position Weight Matrices (PWMs) built from NetMHCpan-4.2 predictions on a 600,000-peptide background sampled from the human SwissProt proteome.
For a detailed description of the method and usage examples, see notebooks/Demo.ipynb.
Requirements
See requirements.txt. Install with:
pip install -r requirements.txt
pip install anchorminer
Quick Start
from anchorminer import predict_anchors
# Without visualization
result = predict_anchors('KILDGVFAV', 'HLA-A02:01', viz=False)
# With visualization — generates KL plot and sequence logo
result = predict_anchors('KILDGVFAV', 'HLA-A02:01', viz=True)
# Access results
print(result['coords']) # anchor position indices (0-indexed)
print(result['verbose']) # per-position details
Output: dict with keys:
coords— list of anchor position indices (0-indexed)verbose— list of dicts per anchor position with KL divergence, canonical/non-canonical classification, biochemical cluster, cumulative cluster frequency, and current amino acidKL— KL divergence plot (only if viz=True)logo— sequence logo with anchor positions highlighted in red (canonical) or blue (non-canonical) (only if viz=True)
Supported Alleles and Peptide Lengths
146 MHC-I alleles covering 92% of worldwide population. Peptide lengths 9–12. Visit datasets/Anchor_Miner_supportedalleles.csv to get a dataframe of allowed HLAs and lengths.
Notes
- Homo sapiens HLA allele format:
HLA-X##:##e.g.HLA-A02:01. Usesrc/standartize_hlas.normalize_allele()to normalize non-standard inputs. Only MHCI alleles are currently supported - Mus Musculus MHC format:
H:2:Kd.
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
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 anchorminer-0.1.4.tar.gz.
File metadata
- Download URL: anchorminer-0.1.4.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49b6e135b3c27ca4a81d3d9970c80e18fc8c86bbb8ba9a7687c7b525e1b9eb0e
|
|
| MD5 |
a747b0156473465791fb809ffd2a763a
|
|
| BLAKE2b-256 |
3ff5dabe7bd3388e3db22db2f8c3d3279ce9b3ced751cecd9a9f360b87e8c369
|
File details
Details for the file anchorminer-0.1.4-py3-none-any.whl.
File metadata
- Download URL: anchorminer-0.1.4-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f706baa015f854cbe0bb4fac871e03c958ae48ecd62239ac98090e6bec934e16
|
|
| MD5 |
488005848a067e1f1a8f7db48ca60a56
|
|
| BLAKE2b-256 |
3e9dfa3fa23ad153c207e7afb135c6ca145f3525dfcbfa5738a8214d8b77e0d2
|