Predict protein subcellular localization using protein language model embeddings.
Project description
proteinloc
Predict protein subcellular localization for prokaryotic proteins using state-of-the-art protein language model embeddings — ESM Cambrian and ProstT5.
proteinloc classifies sequences into six possible subcellular localizations:
- Cellwall
- Cytoplasmic
- CytoplasmicMembrane
- Extracellular
- OuterMembrane
- Periplasmic
Classifier artifacts (~18–23 MB each) are not bundled in the package. They are downloaded from Hugging Face Hub on first use and cached locally.
Installation
Using pip
pip install proteinloc
Using uv
uv tool install proteinloc
[!IMPORTANT]
proteinlocrequires Python ≥ 3.10 and PyTorch ≥ 2.2.
Theesmpackage (EvolutionaryScale ESM Cambrian) requires accepting a license agreement on Hugging Face before model weights can be downloaded. Runhuggingface-cli loginand accept the license at https://huggingface.co/EvolutionaryScale/esmc-300m-2024-12.
Quick start
# Predict from a FASTA file (classifiers download automatically on first run)
proteinloc predict --fasta sequences.fasta --model esm_300
# Output as JSON
proteinloc predict --fasta sequences.fasta --model esm_600 --output-format json
# Save to a file
proteinloc predict --fasta sequences.fasta --model prost --output-format csv --output results.csv
CLI Reference
proteinloc predict
Embed sequences with a protein language model, then classify subcellular localization.
| Option | Description | Default |
|---|---|---|
--fasta PATH |
Input FASTA file (required) | — |
--model [esm_300|esm_600|prost] |
Embedding model (required) | — |
--output-format [table|json|csv] |
Output format | table |
--output PATH |
Write output to file instead of stdout | — |
--device TEXT |
Torch device (cpu, cuda:0, …) |
auto |
--weights-dir PATH |
Local directory with .joblib files (overrides HF Hub) |
— |
proteinloc models download
Pre-fetch classifier artifacts for offline use.
# Download all models
proteinloc models download
# Download a specific model
proteinloc models download --model esm_300
proteinloc info
Show authorship, project context, and version information.
proteinloc models-list
List all available embedding models and their classifier details.
proteinloc output-formats
List available output formats and their descriptions.
Authorship & Context
proteinloc was developed by Juan Diego Puglia as part of a Degree Thesis in Biotechnology at Universidad ORT Uruguay.
The project aims to leverage the power of Protein Language Models (pLMs) to provide fast and accurate subcellular localization predictions for prokaryotic research.
Developing
To set up a local development environment:
-
Clone the repository:
git clone https://github.com/jpuglia/proteinloc cd proteinloc
-
Install dependencies using uv:
uv sync -
Run tests:
uv run pytest tests/ -v
License
MIT © Juan Puglia
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 proteinloc-0.1.1.tar.gz.
File metadata
- Download URL: proteinloc-0.1.1.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b2388d8b1651b7d796e544f41322f8c21d102e4a020f7feccb9a8487e4553a5
|
|
| MD5 |
060e7baeffac6c47fc43e24f67fb163f
|
|
| BLAKE2b-256 |
7bfb57a0400b4ffadab4369f959cccce605f9aec570973d3bd8f06fef0da1943
|
Provenance
The following attestation bundles were made for proteinloc-0.1.1.tar.gz:
Publisher:
publish.yml on jpuglia/proteinloc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proteinloc-0.1.1.tar.gz -
Subject digest:
3b2388d8b1651b7d796e544f41322f8c21d102e4a020f7feccb9a8487e4553a5 - Sigstore transparency entry: 1565520895
- Sigstore integration time:
-
Permalink:
jpuglia/proteinloc@074a37963975f1de20544bb26936dec184d40950 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/jpuglia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@074a37963975f1de20544bb26936dec184d40950 -
Trigger Event:
release
-
Statement type:
File details
Details for the file proteinloc-0.1.1-py3-none-any.whl.
File metadata
- Download URL: proteinloc-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ad4392b4a449b62bc439ec9816f542045eef4bc583e9300cef83e513fe8c99d
|
|
| MD5 |
8bd43d4e2c29417f776b9597e9a15c1f
|
|
| BLAKE2b-256 |
b2522d8929b8c17915cb8e4c7b67c4ad9c528e73a6598df7b0ccadbf308d4a7b
|
Provenance
The following attestation bundles were made for proteinloc-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on jpuglia/proteinloc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proteinloc-0.1.1-py3-none-any.whl -
Subject digest:
0ad4392b4a449b62bc439ec9816f542045eef4bc583e9300cef83e513fe8c99d - Sigstore transparency entry: 1565520940
- Sigstore integration time:
-
Permalink:
jpuglia/proteinloc@074a37963975f1de20544bb26936dec184d40950 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/jpuglia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@074a37963975f1de20544bb26936dec184d40950 -
Trigger Event:
release
-
Statement type: