OpenMS
Loading...
Searching...
No Matches
CalibrationWorkflow Class Reference

Orchestrates calibration workflows for OpenSWATH analysis. More...

#include <OpenMS/ANALYSIS/OPENSWATH/CalibrationWorkflow.h>

Inheritance diagram for CalibrationWorkflow:
[legend]
Collaboration diagram for CalibrationWorkflow:
[legend]

Classes

struct  CalibrationResult
 Results from calibration workflow. More...
 
struct  IrtExperiments
 Prepared iRT experiments ready for calibration. More...
 

Public Member Functions

 CalibrationWorkflow ()
 Default constructor.
 
 ~CalibrationWorkflow () override
 Destructor

 
IrtStrategy determineIrtStrategy (const OpenSwath::LightTargetedExperiment &full_transition_exp, size_t num_runs=1) const
 Determine the appropriate IRT strategy based on available data.
 
IrtExperiments prepareIrtExperiments (IrtStrategy strategy, const OpenSwath::LightTargetedExperiment &full_transition_exp, const std::vector< String > &priority_peptides, size_t run_index=0, const IrtExperiments *cached_irts=nullptr)
 Prepare iRT experiments based on the determined strategy.
 
CalibrationResult performCalibration (std::vector< OpenSwath::SwathMap > &swath_maps, OpenSwath::LightTargetedExperiment &transition_exp, ChromExtractParams &cp, ChromExtractParams &cp_ms1, const IrtExperiments &irt_experiments, const Param &feature_finder_param, const ChromExtractParams &cp_irt, const Param &irt_detection_param, const Param &calibration_param, const Param &mrm_mapping_param, bool pasef=false, bool load_into_memory=false, const String &irt_trafo_out="", const String &irt_mzml_out="", Size debug_level=0)
 Perform calibration workflow with pre-prepared iRT experiments.
 
OpenSwath::LightTargetedExperiment loadIrtExperimentFromFile_ (const String &irt_file_path, const String &label) const
 Load iRT transition experiment from file.
 
TransformationDescription performRTNormalization (const OpenSwath::LightTargetedExperiment &irt_transitions, std::vector< OpenSwath::SwathMap > &swath_maps, TransformationDescription &im_trafo, double min_rsq, double min_coverage, const Param &feature_finder_param, const ChromExtractParams &cp_irt, const Param &irt_detection_param, const Param &calibration_param, const Param &mrm_mapping_param, const String &irt_mzml_out, Size debug_level, bool pasef=false, bool load_into_memory=false)
 Perform RT and m/z correction of the input data using RT-normalization peptides.
 
TransformationDescription doDataNormalization_ (const OpenSwath::LightTargetedExperiment &targeted_exp, const std::vector< OpenMS::MSChromatogram > &chromatograms, TransformationDescription &im_trafo, std::vector< OpenSwath::SwathMap > &swath_maps, double min_rsq, double min_coverage, const Param &default_ffparam, const Param &irt_detection_param, const Param &calibration_param, const bool pasef)
 Perform retention time and m/z calibration.
 
double getEstimatedMzWindow () const
 Get estimated MS2 m/z extraction window.
 
double getEstimatedImWindow () const
 Get estimated MS2 ion mobility extraction window.
 
double getEstimatedMs1MzWindow () const
 Get estimated MS1 m/z extraction window.
 
double getEstimatedMs1ImWindow () const
 Get estimated MS1 ion mobility extraction window.
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages.
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor.
 
virtual ~DefaultParamHandler ()
 Destructor.
 
DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator.
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator.
 
void setParameters (const Param &param)
 Sets the parameters.
 
const ParamgetParameters () const
 Non-mutable access to the parameters.
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters.
 
const StringgetName () const
 Non-mutable access to the name.
 
void setName (const String &name)
 Mutable access to the name.
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections.
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor.
 
virtual ~ProgressLogger ()
 Destructor.
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor.
 
ProgressLoggeroperator= (const ProgressLogger &other)
 Assignment Operator.
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE!
 
LogType getLogType () const
 Returns the type of progress log being used.
 
void setLogger (ProgressLoggerImpl *logger)
 Sets the logger to be used for progress logging.
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display.
 
void setProgress (SignedSize value) const
 Sets the current progress.
 
void endProgress (UInt64 bytes_processed=0) const
 
void nextProgress () const
 increment progress by 1 (according to range begin-end)
 

Private Member Functions

Private implementation methods
CalibrationResult performLinearCalibration_ (std::vector< OpenSwath::SwathMap > &swath_maps, const IrtExperiments &irt_experiments, const Param &feature_finder_param, const ChromExtractParams &cp_irt, const Param &irt_detection_param, const Param &calibration_param, const Param &mrm_mapping_param, bool pasef, bool load_into_memory, const String &irt_trafo_out, const String &irt_mzml_out, Size debug_level)
 Perform linear-only calibration workflow.
 
CalibrationResult performLinearThenNonlinearCalibration_ (std::vector< OpenSwath::SwathMap > &swath_maps, const IrtExperiments &irt_experiments, const Param &feature_finder_param, const ChromExtractParams &cp_irt, const Param &irt_detection_param, const Param &calibration_param, const Param &mrm_mapping_param, bool pasef, bool load_into_memory, const String &irt_trafo_out, const String &irt_mzml_out, Size debug_level)
 Perform linear + nonlinear calibration workflow.
 
void applyEstimatedWindows_ (const CalibrationResult &result, ChromExtractParams &cp, ChromExtractParams &cp_ms1, bool pasef, bool use_ms1_im) const
 Apply estimated extraction windows to parameters.
 
void applyWindow_ (const char *label, double estimate, double &dst_param, double user_value, bool applicable=true, bool commit=true) const
 Validate and log an auto-estimated extraction window.
 
bool isValidWindow_ (double v, double min_positive=1e-9) const noexcept
 Check if an estimated extraction window value is valid.
 

Private Attributes

Private member variables for parameter caching <br>
String linear_irt_file_
 
String nonlinear_irt_file_
 
std::vector< Stringlinear_irt_files_list_
 
std::vector< Stringnonlinear_irt_files_list_
 
bool auto_irt_enabled_
 
int auto_irt_irt_bins_
 
int auto_irt_irt_peptides_per_bin_
 
int auto_irt_irt_seed_
 
int auto_irt_irt_bins_nonlinear_
 
int auto_irt_irt_peptides_per_bin_nonlinear_
 
double auto_irt_linear_top_fraction_
 
double auto_irt_nonlinear_top_fraction_
 
String linear_outlier_detection_
 
String nonlinear_outlier_detection_
 
bool windows_estimate_rt_
 
bool windows_estimate_mz_
 
bool windows_estimate_im_
 
double windows_rt_percentile_
 
double rt_estimation_padding_factor_
 
double min_rsq_
 
double min_coverage_
 

Parameter handling

double estimated_mz_window_ {-1.0}
 
double estimated_im_window_ {-1.0}
 
double estimated_ms1_mz_window_ {-1.0}
 
double estimated_ms1_im_window_ {-1.0}
 
void updateMembers_ () override
 Update member variables from parameters.
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD , GUI , NONE }
 Possible log types. More...
 
- Static Public Member Functions inherited from DefaultParamHandler
static void writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="")
 Writes all parameters to meta values.
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor.
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters.
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes!
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes!
 
String error_name_
 Name that is displayed in error messages during the parameter checking.
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;.
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;.
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImplcurrent_logger_
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

Orchestrates calibration workflows for OpenSWATH analysis.

This class provides a unified interface for performing RT, m/z, and ion mobility calibration workflows. It supports both linear-only calibration and linear+nonlinear calibration strategies, making calibration logic reusable across different OpenSWATH tools (DIA/SWATH, SRM/MRM, PRM).

The orchestrator handles:

  • Parameter validation and setup
  • iRT peptide sampling (when auto_irt is enabled)
  • Linear calibration workflow
  • Nonlinear calibration workflow (optional)
  • Extraction window estimation and application
  • Result aggregation and reporting

Class Documentation

◆ OpenMS::CalibrationWorkflow::CalibrationResult

struct OpenMS::CalibrationWorkflow::CalibrationResult

Results from calibration workflow.

Collaboration diagram for CalibrationWorkflow::CalibrationResult:
[legend]
Class Members
double estimated_rt_window {-1.0} Estimated RT extraction window (full width, seconds)
TransformationDescription im_trafo Ion mobility transformation (fitted). May be empty if no IM calibration performed.
double ms1_im_window {-1.0} MS1 ion mobility extraction window (full width). -1 if not applicable.
double ms1_mz_window_ppm {-1.0} MS1 m/z extraction window (full width, ppm). -1 if not computed.
double ms2_im_window {-1.0} MS2 ion mobility extraction window (full width). -1 if not applicable.
double ms2_mz_window_ppm {-1.0} MS2 m/z extraction window (full width, ppm). -1 if not computed.
TransformationDescription rt_trafo RT normalization transformation (fitted)

◆ OpenMS::CalibrationWorkflow::IrtExperiments

struct OpenMS::CalibrationWorkflow::IrtExperiments

Prepared iRT experiments ready for calibration.

Collaboration diagram for CalibrationWorkflow::IrtExperiments:
[legend]
Class Members
bool is_prepared {false} Whether experiments are available and ready for calibration.
LightTargetedExperiment linear_irt Linear iRT experiment (always required for calibration)
LightTargetedExperiment nonlinear_irt Nonlinear iRT experiment (optional, empty if not used)
IrtStrategy strategy {IrtStrategy::STATIC_FILES} Strategy used to prepare these experiments.

Constructor & Destructor Documentation

◆ CalibrationWorkflow()

Default constructor.

◆ ~CalibrationWorkflow()

~CalibrationWorkflow ( )
override

Destructor

Member Function Documentation

◆ applyEstimatedWindows_()

void applyEstimatedWindows_ ( const CalibrationResult result,
ChromExtractParams cp,
ChromExtractParams cp_ms1,
bool  pasef,
bool  use_ms1_im 
) const
private

Apply estimated extraction windows to parameters.

Updates the provided extraction parameters with auto-estimated windows based on calibration results and user preferences.

Parameters
[in]resultCalibration results containing estimated windows
[in,out]cpMS2 extraction parameters to update
[in,out]cp_ms1MS1 extraction parameters to update
[in]pasefWhether this is PASEF data (for IM applicability)
[in]use_ms1_imWhether MS1 uses ion mobility

◆ applyWindow_()

void applyWindow_ ( const char *  label,
double  estimate,
double &  dst_param,
double  user_value,
bool  applicable = true,
bool  commit = true 
) const
private

Validate and log an auto-estimated extraction window.

Behavior:

  • If applicable is false (e.g., no IM data), logs an INFO and leaves dst_param unchanged.
  • If the estimate is invalid, logs a WARN and leaves dst_param unchanged.
  • If the estimate is valid and commit is true, logs an INFO and assigns dst_param = estimate.
  • If the estimate is valid and commit is false, logs an INFO that reports the estimate and that the user value is kept.

Typical usage:

  • RT window (seconds)
  • MS2 m/z window (ppm)
  • MS1 m/z window (ppm)
  • IM window (1/k0), only when applicable (e.g., PASEF/IM data)
Parameters
[in]labelHuman-readable label for logging
[in]estimateEstimated window value
[in,out]dst_paramParameter to update
[in]user_valueCurrent user-specified value
[in]applicableWhether this window type is applicable
[in]commitWhether to actually apply the estimate

◆ determineIrtStrategy()

IrtStrategy determineIrtStrategy ( const OpenSwath::LightTargetedExperiment full_transition_exp,
size_t  num_runs = 1 
) const

Determine the appropriate IRT strategy based on available data.

Analyzes the available iRT data to determine which IRT strategy should be used for calibration. Priority order:

  1. If static iRT files are configured → STATIC_FILES or RUN_SPECIFIC
  2. If full transition library is provided and auto-iRT is enabled → SAMPLE_ONCE or SAMPLE_PER_RUN
  3. Otherwise → NULL_TRANSFORMATION (no iRT data available)
Parameters
[in]full_transition_expFull transition experiment for auto-sampling (empty if not available)
[in]num_runsTotal number of runs to process (affects strategy choice)
Returns
The determined IRT strategy
Note
When NULL_TRANSFORMATION is returned, callers can decide whether to skip calibration or throw an exception based on their requirements

◆ doDataNormalization_()

TransformationDescription doDataNormalization_ ( const OpenSwath::LightTargetedExperiment targeted_exp,
const std::vector< OpenMS::MSChromatogram > &  chromatograms,
TransformationDescription im_trafo,
std::vector< OpenSwath::SwathMap > &  swath_maps,
double  min_rsq,
double  min_coverage,
const Param default_ffparam,
const Param irt_detection_param,
const Param calibration_param,
const bool  pasef 
)

Perform retention time and m/z calibration.

Uses MRMRTNormalizer for RT calibration and SwathMapMassCorrection for m/z calibration.

The overall execution flow is as follows:

  • Estimate the retention time range of the iRT peptides over all assays (see OpenSwathHelper::estimateRTRange())
  • Store the peptide retention times in an intermediate map
  • Pick input chromatograms to identify RT pairs from the input data using MRMFeatureFinderScoring, which will be used without the RT scoring enabled
  • Find most likely correct feature for each compound (see OpenSwathHelper::simpleFindBestFeature())
  • Perform the outlier detection (see MRMRTNormalizer)
  • Check whether the found peptides fulfill the binned coverage criteria set by the user.
  • Select the "correct" peaks for m/z correction (e.g. remove those not part of the linear regression)
  • Perform m/z and IM calibration (see SwathMapMassCorrection)
  • Store transformation, using the selected model
Parameters
[in]targeted_expThe transitions for the normalization peptides
[out]chromatogramsThe extracted chromatograms
[out]im_trafoIon mobility trafo values on the RT-normalization peptides
[in]swath_mapsThe raw data (swath maps)
[in]min_rsqMinimal R^2 value that is expected for the RT regression
[in]min_coverageMinimal coverage of the chromatographic space that needs to be achieved
[in]default_ffparamParameter set for the feature finding in chromatographic dimension
[in]irt_detection_paramParameter set for the detection of the iRTs (outlier detection, peptides per bin etc)
[in]calibration_paramParameter for the m/z and im calibration (see SwathMapMassCorrection)
[in]pasefwhether this data is pasef data with potentially overlapping m/z windows (differing by IM)
Note
This function is based on the algorithm inside the OpenSwathRTNormalizer tool

◆ getEstimatedImWindow()

double getEstimatedImWindow ( ) const
inline

Get estimated MS2 ion mobility extraction window.

Returns the MS2 ion mobility extraction window (full width) estimated during calibration. This value is only valid after performCalibration() has been called on PASEF/ion mobility data with window estimation enabled.

Returns
Estimated MS2 IM window, or -1.0 if not applicable/computed

◆ getEstimatedMs1ImWindow()

double getEstimatedMs1ImWindow ( ) const
inline

Get estimated MS1 ion mobility extraction window.

Returns the MS1 ion mobility extraction window (full width) estimated during calibration. This value is only valid after performCalibration() has been called on PASEF/ion mobility data with MS1 IM window estimation enabled.

Returns
Estimated MS1 IM window, or -1.0 if not applicable/computed

◆ getEstimatedMs1MzWindow()

double getEstimatedMs1MzWindow ( ) const
inline

Get estimated MS1 m/z extraction window.

Returns the MS1 m/z extraction window (full width, in ppm) estimated during calibration. This value is only valid after performCalibration() has been called and MS1 window estimation was enabled.

Returns
Estimated MS1 m/z window in ppm, or -1.0 if not computed

◆ getEstimatedMzWindow()

double getEstimatedMzWindow ( ) const
inline

Get estimated MS2 m/z extraction window.

Returns the MS2 m/z extraction window (full width, in ppm) estimated during calibration. This value is only valid after performCalibration() has been called and window estimation was enabled.

Returns
Estimated MS2 m/z window in ppm, or -1.0 if not computed

◆ isValidWindow_()

bool isValidWindow_ ( double  v,
double  min_positive = 1e-9 
) const
inlineprivatenoexcept

Check if an estimated extraction window value is valid.

A window is considered valid if it is finite and strictly greater than a small positive threshold. This guards against denormals (e.g., ~1e-310), zeros, negative values, and NaNs/Inf.

Parameters
[in]vWindow value to check
[in]min_positiveMinimum positive threshold
Returns
True if window is valid for use

◆ loadIrtExperimentFromFile_()

OpenSwath::LightTargetedExperiment loadIrtExperimentFromFile_ ( const String irt_file_path,
const String label 
) const

Load iRT transition experiment from file.

Helper method to load iRT experiments from configured file paths. Supports TraML, TSV, and PQP formats.

Parameters
[in]irt_file_pathPath to iRT file (empty = skip loading)
[in]labelLabel for logging (e.g., "linear", "nonlinear")
Returns
Loaded iRT experiment (empty if file path was empty)
Exceptions
Exception::FileNotFoundif file doesn't exist
Exception::ParseErrorif file format is invalid

◆ performCalibration()

CalibrationResult performCalibration ( std::vector< OpenSwath::SwathMap > &  swath_maps,
OpenSwath::LightTargetedExperiment transition_exp,
ChromExtractParams cp,
ChromExtractParams cp_ms1,
const IrtExperiments irt_experiments,
const Param feature_finder_param,
const ChromExtractParams cp_irt,
const Param irt_detection_param,
const Param calibration_param,
const Param mrm_mapping_param,
bool  pasef = false,
bool  load_into_memory = false,
const String irt_trafo_out = "",
const String irt_mzml_out = "",
Size  debug_level = 0 
)

Perform calibration workflow with pre-prepared iRT experiments.

This is the main calibration entry point that accepts pre-prepared iRT experiments and performs RT, m/z, and ion mobility calibration. It automatically chooses between linear-only or linear+nonlinear calibration based on whether nonlinear iRT experiments are provided.

Parameters
[in,out]swath_mapsRaw SWATH/SRM data maps (modified in-place by calibration)
[in,out]transition_expTarget transition experiment (IM values may be corrected)
[in,out]cpExtraction parameters (windows may be updated with estimates)
[in,out]cp_ms1MS1 extraction parameters (windows may be updated)
[in]irt_experimentsPre-prepared iRT experiments for calibration
[in]feature_finder_paramParameters for MRMFeatureFinderScoring
[in]cp_irtExtraction parameters for iRT peptides
[in]irt_detection_paramParameters for iRT detection and outlier removal
[in]calibration_paramParameters for m/z and IM calibration
[in]mrm_mapping_paramParameters for MRM chromatogram mapping
[in]pasefWhether data is PASEF (ion mobility) data
[in]load_into_memoryWhether to load data into memory for processing
[in]irt_trafo_outOutput file for RT transformation (empty = no output)
[in]irt_mzml_outOutput file for iRT chromatograms (empty = no output)
[in]debug_levelDebug level (0 = no debug output, >1 = verbose)
Returns
Calibration results including transformations and estimated windows
Exceptions
Exception::IllegalArgumentIf configuration is invalid
Exception::MissingInformationIf iRT experiments are not ready

◆ performLinearCalibration_()

CalibrationResult performLinearCalibration_ ( std::vector< OpenSwath::SwathMap > &  swath_maps,
const IrtExperiments irt_experiments,
const Param feature_finder_param,
const ChromExtractParams cp_irt,
const Param irt_detection_param,
const Param calibration_param,
const Param mrm_mapping_param,
bool  pasef,
bool  load_into_memory,
const String irt_trafo_out,
const String irt_mzml_out,
Size  debug_level 
)
private

Perform linear-only calibration workflow.

Parameters
[in,out]swath_mapsSWATH data maps
[in]irt_experimentsPrepared iRT experiments
[in]feature_finder_paramParameters for MRMFeatureFinderScoring
[in]cp_irtExtraction parameters for iRT peptides
[in]irt_detection_paramParameters for iRT detection
[in]calibration_paramParameters for calibration
[in]mrm_mapping_paramParameters for MRM mapping
[in]pasefWhether this is PASEF data
[in]load_into_memoryWhether to load data into memory
[in]irt_trafo_outOutput transformation file
[in]irt_mzml_outOutput iRT chromatograms file
[in]debug_levelDebug level (0 = no debug output, >1 = verbose)
Returns
Linear calibration results

◆ performLinearThenNonlinearCalibration_()

CalibrationResult performLinearThenNonlinearCalibration_ ( std::vector< OpenSwath::SwathMap > &  swath_maps,
const IrtExperiments irt_experiments,
const Param feature_finder_param,
const ChromExtractParams cp_irt,
const Param irt_detection_param,
const Param calibration_param,
const Param mrm_mapping_param,
bool  pasef,
bool  load_into_memory,
const String irt_trafo_out,
const String irt_mzml_out,
Size  debug_level 
)
private

Perform linear + nonlinear calibration workflow.

First performs a linear calibration, then applies nonlinear refinement using a separate set of iRT transitions.

Parameters
[in,out]swath_mapsSWATH data maps
[in]irt_experimentsPrepared iRT experiments
[in]feature_finder_paramParameters for MRMFeatureFinderScoring
[in]cp_irtExtraction parameters for iRT peptides
[in]irt_detection_paramParameters for iRT detection
[in]calibration_paramParameters for calibration
[in]mrm_mapping_paramParameters for MRM mapping
[in]pasefWhether this is PASEF data
[in]load_into_memoryWhether to load data into memory
[in]irt_trafo_outOutput transformation file
[in]irt_mzml_outOutput iRT chromatograms file
[in]debug_levelDebug level (0 = no debug output, >1 = verbose)
Returns
Combined calibration results

◆ performRTNormalization()

TransformationDescription performRTNormalization ( const OpenSwath::LightTargetedExperiment irt_transitions,
std::vector< OpenSwath::SwathMap > &  swath_maps,
TransformationDescription im_trafo,
double  min_rsq,
double  min_coverage,
const Param feature_finder_param,
const ChromExtractParams cp_irt,
const Param irt_detection_param,
const Param calibration_param,
const Param mrm_mapping_param,
const String irt_mzml_out,
Size  debug_level,
bool  pasef = false,
bool  load_into_memory = false 
)

Perform RT and m/z correction of the input data using RT-normalization peptides.

This function extracts the RT normalization chromatograms using simpleExtractChromatograms_() and then uses the chromatograms to find features (in doDataNormalization_()). If desired, also m/z correction is performed using the lock masses of the given peptides. The provided raw data (swath_maps) are therefore not constant but may be changed in this function.

Parameters
[in]irt_transitionsA set of transitions used for the RT normalization peptides
[in]swath_mapsThe raw data (swath maps)
[out]im_trafoIon mobility trafo values on the RT-normalization peptides
[in]min_rsqMinimal R^2 value that is expected for the RT regression
[in]min_coverageMinimal coverage of the chromatographic space that needs to be achieved
[in]feature_finder_paramParameter set for the feature finding in chromatographic dimension
[in]cp_irtParameter set for the chromatogram extraction
[in]irt_detection_paramParameter set for the detection of the iRTs (outlier detection, peptides per bin etc)
[in]calibration_paramParameter for the m/z and im calibration (see SwathMapMassCorrection)
[in]mrm_mapping_paramParameter for mapping chromatograms to transitions (MRMMapping)
[in]debug_levelDebug level (writes out the RT normalization chromatograms if larger than 1)
[out]irt_mzml_outOutput Chromatogram mzML containing the iRT peptides (if not empty, iRT chromatograms will be stored in this file)
[in]pasefwhether the data is PASEF data (should match transitions by their IM)
[in]load_into_memoryWhether to cache the current SWATH map in memory

◆ prepareIrtExperiments()

IrtExperiments prepareIrtExperiments ( IrtStrategy  strategy,
const OpenSwath::LightTargetedExperiment full_transition_exp,
const std::vector< String > &  priority_peptides,
size_t  run_index = 0,
const IrtExperiments cached_irts = nullptr 
)

Prepare iRT experiments based on the determined strategy.

This function handles all aspects of iRT experiment preparation:

  • Loading static iRT files
  • Auto-sampling from transition libraries with priority peptides
  • Validation and quality checks
  • Multi-run consistency management

The prepared experiments are ready for use with performCalibration().

Parameters
[in]strategyThe IRT strategy to use
[in]full_transition_expFull transition experiment for auto-sampling (required for sampling strategies)
[in]priority_peptidesPriority peptide sequences for sampling (empty = no priorities)
[in]run_indexCurrent run index (0-based, for run-specific strategies)
[in]cached_irtsPreviously prepared iRT experiments (for reusing sampled iRTs across runs)
Returns
Prepared iRT experiments ready for calibration
Exceptions
Exception::MissingInformationif required data is not available
Exception::InvalidParameterif configuration is invalid

◆ updateMembers_()

void updateMembers_ ( )
overrideprivatevirtual

Update member variables from parameters.

This method is called automatically when parameters change. Updates internal member variables from current parameter values.

Reimplemented from DefaultParamHandler.

Member Data Documentation

◆ auto_irt_enabled_

bool auto_irt_enabled_
private

◆ auto_irt_irt_bins_

int auto_irt_irt_bins_
private

◆ auto_irt_irt_bins_nonlinear_

int auto_irt_irt_bins_nonlinear_
private

◆ auto_irt_irt_peptides_per_bin_

int auto_irt_irt_peptides_per_bin_
private

◆ auto_irt_irt_peptides_per_bin_nonlinear_

int auto_irt_irt_peptides_per_bin_nonlinear_
private

◆ auto_irt_irt_seed_

int auto_irt_irt_seed_
private

◆ auto_irt_linear_top_fraction_

double auto_irt_linear_top_fraction_
private

◆ auto_irt_nonlinear_top_fraction_

double auto_irt_nonlinear_top_fraction_
private

◆ estimated_im_window_

double estimated_im_window_ {-1.0}
private

◆ estimated_ms1_im_window_

double estimated_ms1_im_window_ {-1.0}
private

◆ estimated_ms1_mz_window_

double estimated_ms1_mz_window_ {-1.0}
private

◆ estimated_mz_window_

double estimated_mz_window_ {-1.0}
private

◆ linear_irt_file_

String linear_irt_file_
private

◆ linear_irt_files_list_

std::vector<String> linear_irt_files_list_
private

◆ linear_outlier_detection_

String linear_outlier_detection_
private

◆ min_coverage_

double min_coverage_
private

◆ min_rsq_

double min_rsq_
private

◆ nonlinear_irt_file_

String nonlinear_irt_file_
private

◆ nonlinear_irt_files_list_

std::vector<String> nonlinear_irt_files_list_
private

◆ nonlinear_outlier_detection_

String nonlinear_outlier_detection_
private

◆ rt_estimation_padding_factor_

double rt_estimation_padding_factor_
private

◆ windows_estimate_im_

bool windows_estimate_im_
private

◆ windows_estimate_mz_

bool windows_estimate_mz_
private

◆ windows_estimate_rt_

bool windows_estimate_rt_
private

◆ windows_rt_percentile_

double windows_rt_percentile_
private