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
Metadata
Release files for proteinloc 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| proteinloc-0.1.1.tar.gz | 13.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| proteinloc-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.4 kB
Release files / proteinloc-0.1.1.tar.gz
| Download URL | proteinloc-0.1.1.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b2388d8b1651b7d796e544f41322f8c21d102e4a020f7feccb9a8487e4553a5
|
|
BLAKE2b-256 checksum How to use checksums |
7bfb57a0400b4ffadab4369f959cccce605f9aec570973d3bd8f06fef0da1943
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 18, 2026.
Transparency logRelease files / proteinloc-0.1.1-py3-none-any.whl
| Download URL | proteinloc-0.1.1-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ad4392b4a449b62bc439ec9816f542045eef4bc583e9300cef83e513fe8c99d
|
|
BLAKE2b-256 checksum How to use checksums |
b2522d8929b8c17915cb8e4c7b67c4ad9c528e73a6598df7b0ccadbf308d4a7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 18, 2026.
Transparency logSecurity for proteinloc 0.1.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for proteinloc-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 18, 2026.
Transparency logA 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.