SpectrumAlignment#

class pyopenms.SpectrumAlignment#

Bases: DefaultParamHandler

Aligns the peaks of two sorted spectra. Method 1: Using a banded (width via ‘tolerance’ parameter) alignment if absolute tolerances are given. Scoring function is the m/z distance between peaks. Intensity does not play a role! Method 2: If relative tolerance (ppm) is specified a simple matching of peaks is performed: Peaks from s1 (usually the theoretical spectrum) are assigned to the closest peak in s2 if it lies in the tolerance window. Note: A peak in s2 can be matched to none, one or multiple peaks in s1. Peaks in s1 may be matched to none or one peak in s2. Note: Intensity is ignored.

__init__() → None#
__init__(arg: pyopenms.SpectrumAlignment, /) → None

Methods

__init__()

getDefaults()

Returns the default parameters

getName()

Returns the name

getParameters()

Returns the parameters

getSpectrumAlignment(s1, s2)

Aligns two spectra and returns a list of (index_s1, index_s2) tuples

getSubsections()

setName(name)

Sets the name

setParameters(param)

Sets the parameters

getDefaults() → pyopenms.Param#

Returns the default parameters

getName() → str#

Returns the name

getParameters() → pyopenms.Param#

Returns the parameters

getSpectrumAlignment(s1: pyopenms.MSSpectrum, s2: pyopenms.MSSpectrum) → list#

Aligns two spectra and returns a list of (index_s1, index_s2) tuples

getSubsections() → list[str]#
setName(name: str) → None#

Sets the name

setParameters(param: pyopenms.Param) → None#

Sets the parameters