Skip to main content

A ProForma peptide sequence parser and annotation library

Project description

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

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
  • Built-in Parallel Processing

Installation

pip install peptacular

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.342
mz: float = peptide.mz(charge=2) # 425.678

# Factory pattern
print(peptide.set_charge(2).set_peptide_name("Peptacular").serialize())
# (>Peptacular)PEM[Oxidation]TIDE/2

Quick Start (Functional Based)

When more than one item is passed to the functional API methods, it is automatically parallelized.

import peptacular as pt

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

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

ProForma 2.1 Compliance

See PROFORMA_COMPLIANCE.md for detailed compliance status.

Contributing

Contributions welcome! Check the examples directory for code style and documentation patterns.

License

MIT

Citation

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peptacular-3.1.1.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

peptacular-3.1.1-py3-none-any.whl (162.8 kB view details)

Uploaded Python 3

File details

Details for the file peptacular-3.1.1.tar.gz.

File metadata

  • Download URL: peptacular-3.1.1.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for peptacular-3.1.1.tar.gz
Algorithm Hash digest
SHA256 7e852d2917f94e1d1838f5bde60904a08aabafa014b342e2af0cbbe44451251b
MD5 357e294ab256c23708bd49687882f7c2
BLAKE2b-256 63e7341ce4f65a3ccff8be27a9c3ae612e37ccf6b5c075382a78d20c6e37dde3

See more details on using hashes here.

File details

Details for the file peptacular-3.1.1-py3-none-any.whl.

File metadata

  • Download URL: peptacular-3.1.1-py3-none-any.whl
  • Upload date:
  • Size: 162.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for peptacular-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b9db13425f55a086a9e37104f16e5a7d7db82fa6b2e1f8f4600e38e46d027e5c
MD5 ffc710aa3e3cbccddf3360b145e136fe
BLAKE2b-256 da5279f7dedd917ad355144df1732f8c6a87a8b0af871d2a50bcf5103744a4d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page