Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: legacy-name renamed mhc-to now

HLA-PepClust

Cluster immunopeptidomics peptides by their HLA/MHC binding motif and get a ranked table plus a standalone interactive HTML report.

clust-search takes a GibbsCluster output folder, correlates each cluster's position-specific scoring matrix against a reference of HLA/MHC class I + II binding motifs (human & mouse), and writes the best allele match per cluster.


For users

Requirements: Python 3.9–3.11.

1. Install

Clone the repo and install it (editable, so git pull updates the tool):

git clone https://github.com/PurcellLab/MHC-TP.git
cd MHC-TP
pip install -e .

Prefer a one-liner without cloning? pip install git+https://github.com/PurcellLab/MHC-TP.git A virtual environment (python -m venv .venv && source .venv/bin/activate) is recommended.

2. Download the reference data (once)

The reference motifs are fetched from the GitHub release, not bundled:

clust-search fetch -s human     # or:  mouse  |  all
clust-search search <gibbscluster_output_dir> -s human -o results/

<gibbscluster_output_dir> is a GibbsCluster run folder (it must contain a matrices/ subdirectory).

Outputs land in results/clust_result/:

file what it is
correlations.csv every cluster→allele match above the threshold (hla = display name, formatted = raw key, correlation = PCC)
clust-search-result.html standalone report — open it in any browser

Common options

flag meaning default
-s, --species human or mouse human
-r, --reference path to a <species>.parquet (otherwise the fetched one is used) auto
-t, --threshold minimum Pearson correlation to report 0.70
-o, --output output directory output
--threads max CPU threads (also $HLA_PEPCLUST_THREADS) 4
--no-html write only the CSV off
-l, --log also save the coloured session log off

Run clust-search search --help for the full list.


For contributors / developers

The project uses pixi for a reproducible dev environment (Python 3.11) and a src/ layout packaged with hatchling.

git clone https://github.com/PurcellLab/MHC-TP.git
cd MHC-TP
pixi install            # create the dev env from pixi.lock
pixi run dev-install    # editable-install the package into the env (run once)

pixi run test           # pytest
pixi run lint           # ruff
pixi run fmt            # black

Always run via pixi run … — a bare python may pick up a different interpreter without the pinned dependencies.

Rebuilding the reference data (dev only)

End users never do this. The per-species parquets are built once from the NetMHCpan / NetMHCIIpan packs and uploaded to the release. Embedding the Seq2Logo reference logos (--with-logos) needs a separate Python 2.7 env and is slow — run it on a cluster:

clust-search build-ref <species> <classI_pack> <classII_pack> <out.parquet> \
    --with-logos --workers 16
# Seq2Logo itself runs in its own env:  pixi run -e seq2logo ...

Layout

src/hla_pepclust/
  cli.py            entry point (clust-search)
  engine/           numba correlation search
  refdata/          reference parquet read/write, fetch, schema
  report/           HTML report rendering (data, logos, templates)
  db/               DEV-ONLY reference-pack ingestion
  tui/              Rich console banner, logging, results table
tests/              pytest suite

Metadata

Release files for hla-pepclust 2.0.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 hla-pepclust 2.0.0
File Size Uploaded Provenance Actions
hla_pepclust-2.0.0.tar.gz 2.1 MB Without provenance Details for hla_pepclust-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hla-pepclust 2.0.0
File Interpreter ABI Platform Actions
hla_pepclust-2.0.0-py3-none-any.whl Python 3 none any Details for hla_pepclust-2.0.0-py3-none-any.whl

Total release size: 2.2 MB

Release files / hla_pepclust-2.0.0.tar.gz

Download URL hla_pepclust-2.0.0.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
dcc0082a07a513cb5467bdbcd39e8475f6a1dc7355754547a01c0cc0bf3abc14
BLAKE2b-256 checksum
How to use checksums
99bd13d9d7f7ea1321164b7377911631e8515a86eb09cdab63c984a9a7fc32df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / hla_pepclust-2.0.0-py3-none-any.whl

Download URL hla_pepclust-2.0.0-py3-none-any.whl
Size 42.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7db787aa5d8c4a742b00ba7584746935c24cb87739e626406c3afc4b33e0547
BLAKE2b-256 checksum
How to use checksums
b36ad287c8e0c11dd60bacdf7712042d486c1e04fc6c9469daf7398d407e7b01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for hla-pepclust 2.0.0

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.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

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