rustyms Python bindings

Python bindings to the rustyms library for proteomics and mass spectrometry.

Quickstart

Python bindings are provided to several core components of the rustyms library, including:

rustyms can, for example, annotate a mass spectrum from a ProForma 2.0 peptidoforms string:

import rustyms

# Create a new spectrum
raw_spectrum = rustyms.RawSpectrum(
    title="spectrum_1",
    num_scans=6,
    rt=10,
    precursor_mass=436.12634,
    precursor_charge=2,
    mz_array=[72.04444, 148.06048, 175.05362, 263.08742, 290.08056, 366.09661],
    intensity_array=[100, 600, 300, 400, 500, 200],
)

# Create a new peptide from a ProForma 2.0 string
peptide = rustyms.LinearPeptide("ACDE/2")

# Annotate the spectrum with the peptide
annotated_spectrum = raw_spectrum.annotate(peptide, "cid_hcd")

Installation

Install with pip:

pip install rustyms

Contributing and development

See Contributing for information on the development setup and how to contribute to the rustyms Python bindings.