Skip to main content

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 acid
  • KL — 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. Use src/standartize_hlas.normalize_allele() to normalize non-standard inputs. Only MHCI alleles are currently supported
  • Mus Musculus MHC format: H:2:Kd.

Metadata

Release files for anchorminer 0.1.5

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

Source distribution (sdist)

Source distribution for anchorminer 0.1.5
File Size Uploaded Provenance Actions
anchorminer-0.1.5.tar.gz 1.8 MB Without provenance Details for anchorminer-0.1.5.tar.gz

Built distribution (wheel)

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

Total release size: 4.1 MB

Release files / anchorminer-0.1.5.tar.gz

Download URL anchorminer-0.1.5.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
3788d0a773b477808cd9cb14dc739d894310ebb4aba593e44e9b22456001c391
BLAKE2b-256 checksum
How to use checksums
b3258e62b255be34f94c5df8679c9877511ff2d4ef8c51f7adf0e3bc340a7922
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / anchorminer-0.1.5-py3-none-any.whl

Download URL anchorminer-0.1.5-py3-none-any.whl
Size 2.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cb6c1b0bc46782b1ce19137f9acf652a5220bdbc230421f35b7636c65a2aa388
BLAKE2b-256 checksum
How to use checksums
8c7ff94b784d402275142f8722dde5047d99774969d396cbb423dfdbbfff8d76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for anchorminer 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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