Skip to main content

Peptacular

Peptacular Logo

A Python package for peptide sequence analysis built around ProForma 2.1 notation. Calculate masses, generate fragments, predict isotopic patterns, and more. Peptacular uses type annotations extensively, so it is type safe.

Python package codecov PyPI version Python 3.12+ License: MIT

Documentation/ Examples

ReadTheDocs

Features

  • ProForma 2.1 Parsing
  • Modifiable ProFormaAnnotation Objects (Factory Pattern)
  • Mass/Mz/Composition Calculations
  • Predicted Isotopic Distributions
  • Enzymatic Protein Digestion
  • Fragment Ion Generation
  • Physiochemical Property Calculations
  • Streaming FASTA and Gzip Input
  • Indexed Batch Results and Input Diagnostics
  • Versioned JSON Serialization
  • Optional Pyteomics, psm_utils, and AlphaBase Integrations
  • Built-in Parallel Processing

Installation

pip install peptacular

Optional package adapters can be installed separately:

pip install "peptacular[pyteomics]"
pip install "peptacular[psm-utils]"
pip install "peptacular[alphabase]"

See the interoperability guide and JSON serialization guide for supported conversions and examples.

Quick Start (Object Based)

See docs for more detail.

import peptacular as pt

# Parse a sequence into a ProFormaAnnotation
peptide: pt.ProFormaAnnotation = pt.parse("PEM[Oxidation]TIDE")

# Calculate mass and m/z
mass: float = peptide.mass() # 849.343
mz: float = peptide.mz(charge=2) # 425.679

# Chained edits modify the annotation
print(peptide.set_charge(2).set_peptide_name("Peptacular").serialize())
# (>Peptacular)PEM[Oxidation]TIDE/2

Quick Start (Functional Based)

Small lists run sequentially. Larger lists automatically use parallel execution, with explicit backend and worker overrides available.

import peptacular as pt

peptides = ['[Acetyl]-PEPTIDES', '<13C>ARE', 'SICK/2']

# Calculate mass and m/z for all peptides
masses: list[float] = pt.mass(peptides) # [928.4026, 388.2384, 451.2454]
mzs: list[float] = pt.mz(peptides, charge=2) # [465.2086, 195.1265, 225.6227]

For streaming input, optional batch error collection, and operation diagnostics, see the streaming guide.

results = pt.batch("mass", ["PEPTIDE", "PEP[UnknownModification]TIDE"], errors="collect")
print(results[0].value)
print(results[1].error.code)  # unresolved_modification

Local MCP integration

Peptacular includes 12 optional MCP tools for agents to inspect annotations, calculate theoretical properties, digest protein sequences, and transform annotations. Calls accept small inline batches and return results directly, with no stored data or job setup. Install with pip install "peptacular[mcp]", then check the installation:

peptacular-mcp --check

See the local MCP guide for Claude Code setup, tool examples, limits, and the boundary with Spectacular's spectrum handling.

ProForma 2.1 Compliance

See PROFORMA_COMPLIANCE.md for detailed compliance status.

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines on setting up the development environment, code style, testing, and submitting pull requests.

License

MIT

Citation

Working on a JOSS submission, but in the meantime use:

https://doi.org/10.5281/zenodo.15054278

Release files for peptacular 4.0.1

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

Source distribution (sdist)

Source distribution for peptacular 4.0.1
File Size Uploaded
peptacular-4.0.1.tar.gz 1.3 MB Details

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / peptacular-4.0.1.tar.gz

Download URL peptacular-4.0.1.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
2e251cea471f7539b0d60b62b3b8258f07af0152de64be58fb74ff90f4736cfc
BLAKE2b-256 checksum
How to use checksums
6226dbf0b17622d67458d4e77d2d9592f48e66aeec00603130cb0ec61e6dc470
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 Sep 23, 2026.

Transparency log

Release files / peptacular-4.0.1-py3-none-any.whl

Download URL peptacular-4.0.1-py3-none-any.whl
Size 214.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb10828b696576dae539e735bdae8c6002fd65101c7e828b4b2529a9612b0c44
BLAKE2b-256 checksum
How to use checksums
6213027f2c3dc0946d1e6c00ffbf395527a7e388774f68f01ad1ed7da4038e00
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 Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

5.0.0

2 release files

4.2.0

2 release files

4.1.0

2 release files

This release

4.0.1 This release

2 release files

4.0.0

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

0.0.3

2 release files

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