Skip to main content

Prozor

Quality Documentation Python DOI PyPI License: MIT

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

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prozor 0.1.2
File Size Uploaded Provenance Actions
prozor-0.1.2.tar.gz 10.5 kB With provenance Details for prozor-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for prozor 0.1.2
File Interpreter ABI Platform Actions
prozor-0.1.2-py3-none-any.whl Python 3 none any Details for prozor-0.1.2-py3-none-any.whl

Total release size: 22.6 kB

Release files / prozor-0.1.2.tar.gz

Download URL prozor-0.1.2.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7cf56688bec8f4aaff57f64d371dada9ef6a8fa93bf58f569b13165a34052526
BLAKE2b-256 checksum
How to use checksums
dd784447fc09fc8c5c2e9886d8be056422f53e53a40ae9ca58b4aef2c41d4797
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Release files / prozor-0.1.2-py3-none-any.whl

Download URL prozor-0.1.2-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5978720da96c48ffa785217310d0953a6aae2685b089e77ec9a41455392714b9
BLAKE2b-256 checksum
How to use checksums
faa8e88660f644f94994cb0a86a404c600314a80ca22a129c763366d6df5a216
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Security for prozor 0.1.2

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for prozor-0.1.2.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 Nov 21, 2026.

Transparency log

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.

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