ProtSpace
ProtSpace maps the embedding space of protein language models (pLMs) to reveal relationships that sequence similarity misses. This Python package prepares your data — embed sequences, project to 2D, overlay biological annotations (UniProt, InterPro, AlphaFold/TED, ML predictions), and transfer labels from the nearest neighbour in embedding space (EAT) — then bundles everything into a .parquetbundle you explore interactively at protspace.app, nothing uploaded. Similarity matrices are supported as input too.
- Multiple projections: linear and non-linear dimensionality reduction (PCA, UMAP, t-SNE, and more)
- Automatic annotations: UniProt, InterPro, Taxonomy, TED domains, and Biocentral predictions
- Quality metrics (opt-in): annotation-based cluster-validity + faithfulness (local & global) via
--stats - Annotation transfer (EAT): fill missing annotations from the nearest reference proteins in embedding space via
protspace transfer - Structure viewer: Integrated protein structure visualization
- Export: PNG, PDF, SVG, HTML
🌐 Try Online
ProtSpace web app: fast 2D explorer optimized for large datasets — drag & drop the .parquetbundle this package produces and it is parsed in your browser, nothing uploaded. Small FASTA files can also be dropped directly and prepared for you. Source lives in the same repo under apps/web/.
🚀 Google Colab Notebooks
Note: Use Chrome or Firefox for best experience.
📦 Installation
pip install protspace
Optional extras
| Extra | Install | Needed for |
|---|---|---|
local |
pip install "protspace[local]" |
on-device embedding (--backend local) instead of the Biocentral API |
similarity |
pip install "protspace[similarity]" |
MMseqs2 sequence-similarity projections (-s/--similarity) |
frontend |
pip install "protspace[frontend]" |
the local Dash viewer (protspace serve) |
Upgrading an existing install:
-s/--similarityused to work out of the box because MMseqs2 shipped in the base install. It now lives in thesimilarityextra, so addpip install "protspace[similarity]"if you use that flag. Nothing else changes: the base install got smaller, and on macOS and Linux the extra installs from a prebuilt wheel rather than compiling from source.
🎯 Quick Start
1. Prepare data
# From HDF5 embeddings
protspace prepare -i embeddings.h5 -m pca2,umap2 -o output
# From FASTA (auto-embeds via Biocentral API)
protspace prepare -i sequences.fasta -e prot_t5 -m pca2 -o output
# Multi-model comparison (compare across pLMs)
protspace prepare -i sequences.fasta -e prot_t5,esm2_650m,ankh_base -m pca2,umap2 -o output
# Combine datasets (same embedding name → proteins are unioned)
protspace prepare -i species_a.h5:prot_t5 -i species_b.h5:prot_t5 -m umap2 -o output
2. Explore results
Open the generated .parquetbundle at protspace.app/explore — it is read locally in your browser.
3. Power-user workflow (individual steps)
protspace embed -i sequences.fasta -e prot_t5 -e esm2_3b -o embeddings/
protspace project -i embeddings/prot_t5.h5 -i embeddings/esm2_3b.h5 -m pca2,umap2 -o projections/
protspace annotate -i embeddings/prot_t5.h5 -a default -o annotations.parquet
protspace stats -i embeddings/prot_t5.h5 -p projections/ -o statistics.parquet # optional: quality metrics
protspace bundle -p projections/ -a annotations.parquet -s statistics.parquet -o output.parquetbundle
protspace transfer -b output.parquetbundle -e embeddings/prot_t5.h5 -t superfamily -o transferred.parquetbundle # optional: fill gaps via EAT
Or compute quality metrics inline during prepare with --stats (opt-in): annotation-based cluster-validity + faithfulness per projection. See the CLI Reference.
Fill missing annotation values from the nearest annotated protein in embedding space with protspace transfer — Embedding Annotation Transfer (EAT).
📊 Example Output
✨ Annotations
Use -a to color-code proteins by UniProt, InterPro, Taxonomy, TED domain, and Biocentral prediction annotations. Groups (default, all, uniprot, interpro, taxonomy, ted, biocentral) and individual names can be mixed freely. If -a is omitted, the default group is used.
protspace prepare -i data.h5 -m pca2 # default annotations
protspace prepare -i data.h5 -a default,interpro,kingdom -m pca2 # mix groups + individual
📖 Documentation
Full documentation lives at protspace.app/docs:
- CLI Reference — commands, options, method parameters
- Annotation Reference — every annotation, its group, data source, and output format
- Annotation Styling — custom colors, shapes, sort modes, and the
--generate-templateworkflow - Bundle Format — what is inside a
.parquetbundle
🧩 Where this fits
protspace is the data-preparation half of ProtSpace. It lives in the
protspace monorepo alongside the web explorer:
| Piece | What it does |
|---|---|
protspace (this package, apps/protspace/) |
Embed, project, annotate, bundle — produces .parquetbundle |
Web explorer (apps/web/) |
Opens a .parquetbundle at protspace.app/explore |
Issues and pull requests for both go to github.com/tsenoner/protspace.
📝 Citation
If you use ProtSpace, please cite the web application preprint (latest):
Senoner T, Vahidi P, Olenyi T, Senoner F, Sisman G, Kahl E, Rost B, Koludarov I. ProtSpace: Protein Universe in Your Browser. bioRxiv, 2026. doi:10.64898/2026.05.04.722720
The original, peer-reviewed ProtSpace publication:
Senoner T, Olenyi T, Heinzinger M, Spannagl A, Bouras G, Rost B, Koludarov I. ProtSpace: A Tool for Visualizing Protein Space. Journal of Molecular Biology, 437(15), 168940, 2025. doi:10.1016/j.jmb.2025.168940
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 protspace-4.11.2.tar.gz.
File metadata
- Download URL: protspace-4.11.2.tar.gz
- Upload date:
- Size: 13.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a042ba8181a0b2290ed148d2b4044c9fd201bda7c33dbbce500053dfc8fc59a
|
|
| MD5 |
478a0f89d499dd6d1f4a239a6897d2fa
|
|
| BLAKE2b-256 |
bb752882975d88c1186421d5411a46aea58e1ec9aa59a76ab9df634b9ca4eb31
|
Provenance
The following attestation bundles were made for protspace-4.11.2.tar.gz:
Publisher:
protspace-publish.yml on tsenoner/protspace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
protspace-4.11.2.tar.gz -
Subject digest:
3a042ba8181a0b2290ed148d2b4044c9fd201bda7c33dbbce500053dfc8fc59a - Sigstore transparency entry: 2453149584
- Sigstore integration time:
-
Permalink:
tsenoner/protspace@4a7dd9d2ef40d3833a208d0db80e972e81ab669c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tsenoner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
protspace-publish.yml@4a7dd9d2ef40d3833a208d0db80e972e81ab669c -
Trigger Event:
repository_dispatch
-
Statement type:
File details
Details for the file protspace-4.11.2-py3-none-any.whl.
File metadata
- Download URL: protspace-4.11.2-py3-none-any.whl
- Upload date:
- Size: 770.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dc4f11e63bb170667a349e4bc52a22ae4ea7bddaed965e7c2e1ec76d9200b2f
|
|
| MD5 |
e844f5c0adec2ccb7cfb8279f04aea3b
|
|
| BLAKE2b-256 |
546a3b27134d1d193fddbad421ee0caf9872b505b4125d3a1a40baa0488e18dc
|
Provenance
The following attestation bundles were made for protspace-4.11.2-py3-none-any.whl:
Publisher:
protspace-publish.yml on tsenoner/protspace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
protspace-4.11.2-py3-none-any.whl -
Subject digest:
3dc4f11e63bb170667a349e4bc52a22ae4ea7bddaed965e7c2e1ec76d9200b2f - Sigstore transparency entry: 2453149744
- Sigstore integration time:
-
Permalink:
tsenoner/protspace@4a7dd9d2ef40d3833a208d0db80e972e81ab669c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tsenoner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
protspace-publish.yml@4a7dd9d2ef40d3833a208d0db80e972e81ab669c -
Trigger Event:
repository_dispatch
-
Statement type: