Prozor
Typed peptide-to-protein matching and deterministic greedy-parsimony protein inference.
This repository is a Python port of the R prozor package.
Prozor offers backend-neutral Aho--Corasick matching over mappings or streaming protein records, occurrence-level annotations, unique peptide--protein edges, and deterministic protein inference. The core deliberately does not parse FASTA files or depend on pandas, AnnData, MuData, MuLink, workflow engines, or consumer CLIs.
Documentation · Getting started · API reference
Documentation: https://anndata-omics-bridge.github.io/prozor/
Installation
python -m pip install prozor
Both matching implementations are installed. The public matching operations
default to backend="auto", which selects ahocorasick_rs. The portable
ahocorapy implementation remains directly selectable and is the automatic
runtime fallback if Rust cannot be imported. Results record both the requested
and concrete backend.
Quick start
from dataclasses import dataclass
from prozor.api import annotate_peptides_streaming, greedy_parsimony
@dataclass(frozen=True, slots=True)
class Protein:
id: str
sequence: str
matches = annotate_peptides_streaming(
["PEPTIDE", "SEQUENCE"],
[
Protein("P1", "MYPEPTIDESEQUENCE"),
Protein("P2", "XXSEQUENCEXX"),
],
)
for match in matches:
print(match.peptide, match.protein_id, match.start, match.end)
edges = {(match.peptide, match.protein_id) for match in matches}
protein_groups = greedy_parsimony(edges)
print(protein_groups.to_dict())
Matches include nested, overlapping, and repeated sites using half-open coordinates. Prozor matches the exact strings supplied by the consumer; FASTA header interpretation, normalization, decoy classification, and persistence remain application policy.
Development
uv sync --group dev --group docs
.venv/bin/pre-commit install --hook-type pre-commit --hook-type pre-push
make check
make check runs Ruff, strict Pyright, dependency validation, branch-coverage
tests, a strict documentation build, and wheel/sdist validation. All Python
commands run from the synchronized project .venv.
Provenance and license
This implementation ports the algorithmic behavior of the R prozor package and consolidates the matching and inference core for Python consumers such as APB and diann_runner.
The Python distribution is an independent implementation of that algorithm rather than a translation of the R source, and it is licensed under MIT. The R reference package remains GPL-3, and its license does not extend here: the copyright holder of both packages is the same author, and algorithms are not themselves subject to copyright.
MIT keeps the whole anndata-omics-bridge spine under one permissive license, so that consumers such as APB can be redistributed without inheriting copyleft obligations from this package.
Metadata
Release files for prozor 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 | |
|---|---|---|---|
| prozor-0.1.1.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prozor-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.9 kB
Release files / prozor-0.1.1.tar.gz
| Download URL | prozor-0.1.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3daef82dbd765af3d7986dd3dc35eb719e37c74f634e8dd414ac9fac256eb4b3
|
|
BLAKE2b-256 checksum How to use checksums |
c6d2fa1e60109262e3ffbdca14715fe8eb953127ce243bcdb5fcc44843732f6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 5, 2026.
Transparency logRelease files / prozor-0.1.1-py3-none-any.whl
| Download URL | prozor-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
861ad2f25a9859fabf4d1c27a57274010b8b54a330fd99bc5c2b1bb1089465b7
|
|
BLAKE2b-256 checksum How to use checksums |
e481460be502d4c9868db6e7775b47a2ec39a7fc6cd53979f20b451c9f382284
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 5, 2026.
Transparency log