SpectralDeconvolution#
- class pyopenms.SpectralDeconvolution#
Bases:
DefaultParamHandlerSpectral deconvolution algorithm for top-down MS. From MSSpectrum, this class outputs DeconvolvedSpectrum. Deconvolution takes three steps: 1) decharging and select candidate masses - speed up via binning 2) collecting isotopes from the candidate masses and deisotoping 3) scoring and filter out low scoring masses Constructors
- __init__() None#
- __init__(arg: pyopenms.SpectralDeconvolution, /) None
Methods
__init__()calculateAveragine(use_RNA_averagine)Precalculate averagine (for predefined mass bins) to speed up averagine generation
Get calculated averagine.
getCosine(a, a_start, a_end, b, offset, ...)Cosine similarity between a and the isotope distribution b
Returns a copy of the deconvolved spectrum after performSpectrumDeconvolution() is called
Returns the default parameters
getIsotopeCosineAndIsoOffset(mono_mass, ...)Examine intensity distribution over isotope indices and determine most plausible isotope index
getName()Returns the name
getNominalMass(mass)Convert a double mass to nominal mass (integer)
Returns the parameters
performSpectrumDeconvolution(spec, ...)Main deconvolution function that generates the deconvolved spectrum.
setAveragine(avg)Set the precalculated averagine
setName(name)Sets the name
setParameters(param)Sets the parameters
setTargetDecoyType(target_decoy_type, ...)Set target decoy type for the SpectralDeconvolution run
setTargetMasses(masses[, exclude])Set targeted or excluded masses for targeted deconvolution.
Widen the maximum Dalton tolerance, as needed when estimating tolerance
- calculateAveragine(use_RNA_averagine: bool) None#
Precalculate averagine (for predefined mass bins) to speed up averagine generation
- getAveragine() pyopenms.PrecalAveragine#
Get calculated averagine. Call after calculateAveragine() is called.
- static getCosine(a: collections.abc.Sequence[float], a_start: int, a_end: int, b: pyopenms.IsotopeDistribution, offset: int, min_iso_len: int) float#
Cosine similarity between a and the isotope distribution b
- getDeconvolvedSpectrum() pyopenms.DeconvolvedSpectrum#
Returns a copy of the deconvolved spectrum after performSpectrumDeconvolution() is called
- getDefaults() pyopenms.Param#
Returns the default parameters
- static getIsotopeCosineAndIsoOffset(mono_mass: float, per_isotope_intensities: collections.abc.Sequence[float], avg: pyopenms.PrecalAveragine, iso_int_shift: int, window_width: int, excluded_masses: collections.abc.Sequence[float]) tuple#
Examine intensity distribution over isotope indices and determine most plausible isotope index
- getName() str#
Returns the name
- static getNominalMass(mass: float) int#
Convert a double mass to nominal mass (integer)
- getParameters() pyopenms.Param#
Returns the parameters
- getSubsections() list[str]#
- performSpectrumDeconvolution(spec: pyopenms.MSSpectrum, scan_number: int, precursor_peak_group: pyopenms.PeakGroup) None#
Main deconvolution function that generates the deconvolved spectrum.
- Parameters:
spec – The original spectrum
scan_number – Scan number from input spectrum
precursor_peak_group – Precursor peak group (for MS2+)
- setAveragine(avg: pyopenms.PrecalAveragine) None#
Set the precalculated averagine
- setName(name: str) None#
Sets the name
- setParameters(param: pyopenms.Param) None#
Sets the parameters
- setTargetDecoyType(target_decoy_type: pyopenms.PeakGroup.TargetDecoyType, target_dspec_for_decoy_calcualtion: pyopenms.DeconvolvedSpectrum) None#
Set target decoy type for the SpectralDeconvolution run
- setTargetMasses(masses: collections.abc.Sequence[float], exclude: bool = False) None#
Set targeted or excluded masses for targeted deconvolution. Masses are targeted or excluded in all MS levels.
- setToleranceEstimation() None#
Widen the maximum Dalton tolerance, as needed when estimating tolerance