Welcome to Paftacular's documentation! Paftacular is a Python library for parsing and serializing mzPAF (Peak Annotation Format). mzPAF is a specification from the Proteomics Standards Initiative (PSI)
that provides a compact, human-readable notation for describing fragment ion types, chemical modifications,
charge states, mass errors, and confidence scores.
Features
mzPAF parsing: Handles parsing / serializing of mzPAF strings
Properties: Supports calculating mass and composition of annotated ions
Type-Annotations: typed.py file for static type checking
Caching: serialization and parsing results are cached for performance (when applicable)
Integrated: Integrated with peptacular, such that peptacular can output mzPAF annotations for fragment ions
Quick Example
import paftacular as pft
ann = pft.parse("y5")
print(ann.ion_type.series)
print(ann.get_mass())
y
19.017841150651
New to paftacular? Start with Installation and Quickstart. See Usage for the full guide, including creating annotations programmatically, computing masses/compositions, and round-tripping to mzPAF strings.
Contents:
- Installation
- Quickstart
- Usage
- Basic Peptide Ions
- Other Ion Types
- Modifications
- Isotopes
- Adducts
- Charge States
- Mass Errors and Confidence
- Complex Annotations
- Mass Calculations
- Parsing Multiple Annotations
- Creating Annotations Programmatically
- Serialization (Round-trip)
- Export to Dictionary
- Peptacular Integration
- Resolving Analyte Context
- Structured Errors and Batch Parsing
- Versioned Interchange
- Calculation and Serialization Conventions
- Migrating from 1.x to 2.0
- AI clients through MCP
- API Reference
- Changelog
- Citation