Skip to main content

Peptacular

Peptacular Logo

Python package codecov PyPI version DOI Python 3.12+ License: MIT

Peptacular parses ProForma 2.1 peptide sequences and calculates their masses, fragments, and isotopic distributions. It's for anyone working with peptide-level proteomics data in Python who wants exact masses and fragment ions without hand-rolling ProForma parsing and mass tables. It's built on tacular's lookup data, and its fragments export directly as mzPAF strings readable by paftacular.

Why peptacular?

  • Full ProForma 2.1 parsing into a chainable, editable ProFormaAnnotation object — or use the functional API directly on strings.
  • Mass, m/z, composition, and predicted isotopic distributions, with monoisotopic and average mass support.
  • Enzymatic digestion with missed cleavages, semi-specific, and non-specific modes.
  • Fragment ion generation for 20+ ion types, exportable straight to mzPAF strings for paftacular.
  • Batch-friendly: functional API calls on lists of sequences parallelize automatically, with streaming FASTA/gzip input and per-item error collection.
  • Type-annotated throughout, plus optional Pyteomics, psm_utils, AlphaBase, and MCP integrations.

Install

pip install peptacular

Optional integrations install as extras:

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

See the interoperability guide for supported conversions.

Quick example

import peptacular as pt

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

# Calculate mass and m/z
print(peptide.mass())              # 849.3426002717299
print(peptide.mz(charge=2))        # 425.67857658818554

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

What else it can do

Digest a protein and generate fragment ions that round-trip through paftacular's mzPAF parser:

import peptacular as pt

trypsin = pt.PROTEASE_LOOKUP["trypsin"]
peptides = pt.digest("MKVLATSAGERTIDEK", enzyme_regex=trypsin.regex, missed_cleavages=1)
print([seq for seq, _ in peptides])
# ['MK', 'MKVLATSAGER', 'VLATSAGER', 'VLATSAGERTIDEK', 'TIDEK']

fragments = pt.fragment("PEPTIDE", ion_types=("b", "y"), charges=[1])
print(fragments[1].to_mzpaf())  # b2{PE}

The functional API operates on lists directly, auto-parallelizing for larger batches:

import peptacular as pt

peptides = ["[Acetyl]-PEPTIDES", "<13C>ARE", "SICK/2"]
print(pt.mass(peptides))               # [928.4025574375299, 388.23835027296, 451.245357946571]
print(pt.mz(peptides, charge=2))       # [465.20855517108555, 195.12645158880056, 225.6226789732855]

For streaming input and per-item error collection instead of a raised exception, see the streaming guide:

import peptacular as pt

results = pt.batch("mass", ["PEPTIDE", "PEP[UnknownModification]TIDE"], errors="collect")
print(results[0].value)                # 799.3599640328299
print(results[1].error.code)           # unresolved_modification
Area Entry points
Digestion pt.digest, pt.semi_digest, pt.nonspecific_digest
Fragmentation pt.fragment, pt.fast_fragment
Isotopes pt.isotopic_distribution, pt.brain_isotopic_distribution
FASTA / streaming pt.parse_fasta, pt.iter_fasta, pt.batch, pt.iter_batch
JSON interchange see the JSON serialization guide

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 client setup, tool examples, and limits.

Documentation

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

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.1.0
File Size Uploaded
peptacular-4.1.0.tar.gz 1.3 MB Details

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / peptacular-4.1.0.tar.gz

Download URL peptacular-4.1.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
aaf878f724639c452e8e221ec3b05705c2deedffcc158cd43c351ad743c9e892
BLAKE2b-256 checksum
How to use checksums
e2508f53403cdde4dd8c4f96e7d55eb7289c9d969225c5878054290d95c55d86
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.1.0-py3-none-any.whl

Download URL peptacular-4.1.0-py3-none-any.whl
Size 217.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d31795b7ee5688e3f1330c15a9b051fec617598c207087cc5e244677a75ad708
BLAKE2b-256 checksum
How to use checksums
1ebd278b165a1cf6061c7fd2fbd59cd182fd5f5d5cefae5b97314dc8adbe9f82
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

This release

4.1.0 This release

2 release files

4.0.1

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