InternalCalibration#

class pyopenms.InternalCalibration#

Bases: ProgressLogger

A mass recalibration method using linear/quadratic interpolation (robust/weighted) of given reference masses

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

Methods

__init__()

applyTransformation(pcs, trafo)

Overloaded function.

calibrate(exp, target_mslvl, model_type, ...)

Calibrate an experiment using previously collected calibration points

endProgress([bytes_processed])

Ends the progress display

fillCalibrants(exp, ref_masses, tol_ppm, ...)

Overloaded function.

getCalibrationPoints()

Returns a copy of the container of calibration points

getLogType()

Returns the type of progress log being used

nextProgress()

Increment progress by 1 (according to range begin-end)

setLogType(type)

Sets the progress log that should be used.

setProgress(value)

Sets the current progress

startProgress(begin, end, label)

Attributes

CMD = 0#
GUI = 1#
NONE = 2#
static applyTransformation(pcs: collections.abc.Sequence[pyopenms.Precursor], trafo: pyopenms.MZTrafoModel) → list[pyopenms.Precursor]#
static applyTransformation(spec: pyopenms.MSSpectrum, target_mslvl: collections.abc.Sequence[int], trafo: pyopenms.MZTrafoModel) → None
static applyTransformation(exp: pyopenms.MSExperiment, target_mslvl: collections.abc.Sequence[int], trafo: pyopenms.MZTrafoModel) → None

Overloaded function.

  1. applyTransformation(pcs: collections.abc.Sequence[pyopenms.Precursor], trafo: pyopenms.MZTrafoModel) -> list[pyopenms.Precursor]

Transform a precursor’s m/z

Calibrate m/z of precursors.

Parameters:
  • pcs – Uncalibrated precursors

  • trafo – The calibration function to apply

Returns:

Updated precursors with calibration applied

  1. applyTransformation(spec: pyopenms.MSSpectrum, target_mslvl: collections.abc.Sequence[int], trafo: pyopenms.MZTrafoModel) -> None

  2. applyTransformation(exp: pyopenms.MSExperiment, target_mslvl: collections.abc.Sequence[int], trafo: pyopenms.MZTrafoModel) -> None

calibrate(exp: pyopenms.MSExperiment, target_mslvl: collections.abc.Sequence[int], model_type: pyopenms.MZTrafoModel.MODELTYPE, rt_chunk: float, use_RANSAC: bool, post_ppm_median: float, post_ppm_MAD: float, file_models: str = '', file_models_plot: str = '', file_residuals: str = '', file_residuals_plot: str = '', rscript_executable: str = 'Rscript') → bool#

Calibrate an experiment using previously collected calibration points

endProgress(bytes_processed: int = 0) → None#

Ends the progress display

fillCalibrants(exp: pyopenms.MSExperiment, ref_masses: collections.abc.Sequence[pyopenms.InternalCalibration_LockMass], tol_ppm: float, lock_require_mono: bool, lock_require_iso: bool, verbose: bool = True) → tuple#
fillCalibrants(fm: pyopenms.FeatureMap, tol_ppm: float) → int
fillCalibrants(pep_ids: pyopenms.PeptideIdentificationList, tol_ppm: float) → int

Overloaded function.

  1. fillCalibrants(exp: pyopenms.MSExperiment, ref_masses: collections.abc.Sequence[pyopenms.InternalCalibration_LockMass], tol_ppm: float, lock_require_mono: bool, lock_require_iso: bool, verbose: bool = True) -> tuple

Extract calibrants from raw spectra. Returns (number_found, failed_lock_masses)

  1. fillCalibrants(fm: pyopenms.FeatureMap, tol_ppm: float) -> int

Extract calibrants from feature identifications

  1. fillCalibrants(pep_ids: pyopenms.PeptideIdentificationList, tol_ppm: float) -> int

Extract calibrants from peptide identifications

getCalibrationPoints() → pyopenms.CalibrationData#

Returns a copy of the container of calibration points

getLogType() → pyopenms.ProgressLogger.LogType#

Returns the type of progress log being used

nextProgress() → None#

Increment progress by 1 (according to range begin-end)

setLogType(type: pyopenms.ProgressLogger.LogType) → None#

Sets the progress log that should be used. The default type is NONE!

setProgress(value: int) → None#

Sets the current progress

startProgress(begin: int, end: int, label: str) → None#