OpenMS
PeakPickerMRM Class Reference

The PeakPickerMRM finds peaks a single chromatogram. More...

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

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

Public Types

enum  FLOATINDICES {
  IDX_FWHM = 0 , IDX_ABUNDANCE = 1 , IDX_LEFTBORDER = 2 , IDX_RIGHTBORDER = 3 ,
  SIZE_OF_FLOATINDICES
}
 indices into FloatDataArrays of resulting picked chromatograms More...
 

Public Member Functions

 PeakPickerMRM ()
 Constructor. More...
 
 ~PeakPickerMRM () override
 Destructor. More...
 
void pickChromatogram (const MSChromatogram &chromatogram, MSChromatogram &picked_chrom)
 Finds peaks in a single chromatogram and annotates left/right borders. More...
 
void pickChromatogram (const MSChromatogram &chromatogram, MSChromatogram &picked_chrom, MSChromatogram &smoothed_chrom)
 Finds peaks in a single chromatogram and annotates left/right borders. More...
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 

Protected Member Functions

void pickChromatogramCrawdad_ (const MSChromatogram &chromatogram, MSChromatogram &picked_chrom)
 
void pickChromatogram_ (const MSChromatogram &chromatogram, MSChromatogram &picked_chrom)
 
void integratePeaks_ (const MSChromatogram &chromatogram)
 Compute peak area (peak integration) More...
 
Size findClosestPeak_ (const MSChromatogram &chromatogram, double target_rt, Size current_peak=0)
 Helper function to find the closest peak in a chromatogram to "target_rt". More...
 
void removeOverlappingPeaks_ (const MSChromatogram &chromatogram, MSChromatogram &picked_chrom)
 Helper function to remove overlapping peaks in a single Chromatogram. More...
 
void updateMembers_ () override
 Synchronize members with param class. More...
 
PeakPickerMRMoperator= (const PeakPickerMRM &rhs)
 Assignment operator is protected for algorithm. More...
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Protected Attributes

UInt sgolay_frame_length_
 Frame length for the SGolay smoothing. More...
 
UInt sgolay_polynomial_order_
 Polynomial order for the SGolay smoothing. More...
 
double gauss_width_
 Width of the Gaussian smoothing. More...
 
bool use_gauss_
 Whether to use Gaussian smoothing. More...
 
bool remove_overlapping_
 Whether to resolve overlapping peaks. More...
 
double peak_width_
 Forced peak with. More...
 
double signal_to_noise_
 Signal to noise threshold. More...
 
double sn_win_len_
 Signal to noise window length. More...
 
UInt sn_bin_count_
 Signal to noise bin count. More...
 
bool write_sn_log_messages_
 Whether to write out log messages of the SN estimator. More...
 
String method_
 Peak picker method. More...
 
std::vector< double > integrated_intensities_
 Temporary vector to hold the integrated intensities. More...
 
std::vector< int > left_width_
 Temporary vector to hold the peak left widths. More...
 
std::vector< int > right_width_
 Temporary vector to hold the peak right widths. More...
 
PeakPickerHiRes pp_
 
SavitzkyGolayFilter sgolay_
 
GaussFilter gauss_
 
SignalToNoiseEstimatorMedian< MSChromatogramsnt_
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 

Additional Inherited Members

- 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. More...
 

Detailed Description

The PeakPickerMRM finds peaks a single chromatogram.

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
sgolay_frame_length int15  The number of subsequent data points used for smoothing.
This number has to be uneven. If it is not, 1 will be added.
sgolay_polynomial_order int3  Order of the polynomial that is fitted.
gauss_width float50.0  Gaussian width in seconds, estimated peak size.
use_gauss stringtrue false, trueUse Gaussian filter for smoothing (alternative is Savitzky-Golay filter)
peak_width float-1.0  Force a certain minimal peak_width on the data (e.g. extend the peak at least by this amount on both sides) in seconds. -1 turns this feature off.
signal_to_noise float1.0 min: 0.0Signal-to-noise threshold at which a peak will not be extended any more. Note that setting this too high (e.g. 1.0) can lead to peaks whose flanks are not fully captured.
sn_win_len float1000.0  Signal to noise window length.
sn_bin_count int30  Signal to noise bin count.
write_sn_log_messages stringfalse true, falseWrite out log messages of the signal-to-noise estimator in case of sparse windows or median in rightmost histogram bin
remove_overlapping_peaks stringfalse false, trueTry to remove overlapping peaks during peak picking
method stringcorrected legacy, corrected, crawdadWhich method to choose for chromatographic peak-picking (OpenSWATH legacy on raw data, corrected picking on smoothed chromatogram or Crawdad on smoothed chromatogram).

Note:
  • If a section name is documented, the documentation is displayed as tooltip.
  • Advanced parameter names are italic.

It uses the PeakPickerHiRes internally to find interesting seed candidates. These candidates are then expanded and a right/left border of the peak is searched. Additionally, overlapping peaks can be removed.

Member Enumeration Documentation

◆ FLOATINDICES

indices into FloatDataArrays of resulting picked chromatograms

Enumerator
IDX_FWHM 
IDX_ABUNDANCE 
IDX_LEFTBORDER 
IDX_RIGHTBORDER 
SIZE_OF_FLOATINDICES 

Constructor & Destructor Documentation

◆ PeakPickerMRM()

Constructor.

◆ ~PeakPickerMRM()

~PeakPickerMRM ( )
inlineoverride

Destructor.

Member Function Documentation

◆ findClosestPeak_()

Size findClosestPeak_ ( const MSChromatogram chromatogram,
double  target_rt,
Size  current_peak = 0 
)
protected

Helper function to find the closest peak in a chromatogram to "target_rt".

The search will start from the index current_peak, so the function is assuming the closest peak is to the right of current_peak.

It will return the index of the closest peak in the chromatogram.

◆ integratePeaks_()

void integratePeaks_ ( const MSChromatogram chromatogram)
protected

Compute peak area (peak integration)

◆ operator=()

PeakPickerMRM& operator= ( const PeakPickerMRM rhs)
protected

Assignment operator is protected for algorithm.

◆ pickChromatogram() [1/2]

void pickChromatogram ( const MSChromatogram chromatogram,
MSChromatogram picked_chrom 
)

Finds peaks in a single chromatogram and annotates left/right borders.

It uses a modified algorithm of the PeakPickerHiRes

This function will return a picked chromatogram

◆ pickChromatogram() [2/2]

void pickChromatogram ( const MSChromatogram chromatogram,
MSChromatogram picked_chrom,
MSChromatogram smoothed_chrom 
)

Finds peaks in a single chromatogram and annotates left/right borders.

It uses a modified algorithm of the PeakPickerHiRes

This function will return a picked chromatogram and a smoothed chromatogram

◆ pickChromatogram_()

void pickChromatogram_ ( const MSChromatogram chromatogram,
MSChromatogram picked_chrom 
)
protected

◆ pickChromatogramCrawdad_()

void pickChromatogramCrawdad_ ( const MSChromatogram chromatogram,
MSChromatogram picked_chrom 
)
protected

◆ removeOverlappingPeaks_()

void removeOverlappingPeaks_ ( const MSChromatogram chromatogram,
MSChromatogram picked_chrom 
)
protected

Helper function to remove overlapping peaks in a single Chromatogram.

◆ updateMembers_()

void updateMembers_ ( )
overrideprotectedvirtual

Synchronize members with param class.

Reimplemented from DefaultParamHandler.

Member Data Documentation

◆ gauss_

GaussFilter gauss_
protected

◆ gauss_width_

double gauss_width_
protected

Width of the Gaussian smoothing.

◆ integrated_intensities_

std::vector<double> integrated_intensities_
protected

Temporary vector to hold the integrated intensities.

◆ left_width_

std::vector<int> left_width_
protected

Temporary vector to hold the peak left widths.

◆ method_

String method_
protected

Peak picker method.

◆ peak_width_

double peak_width_
protected

Forced peak with.

◆ pp_

PeakPickerHiRes pp_
protected

◆ remove_overlapping_

bool remove_overlapping_
protected

Whether to resolve overlapping peaks.

◆ right_width_

std::vector<int> right_width_
protected

Temporary vector to hold the peak right widths.

◆ sgolay_

SavitzkyGolayFilter sgolay_
protected

◆ sgolay_frame_length_

UInt sgolay_frame_length_
protected

Frame length for the SGolay smoothing.

◆ sgolay_polynomial_order_

UInt sgolay_polynomial_order_
protected

Polynomial order for the SGolay smoothing.

◆ signal_to_noise_

double signal_to_noise_
protected

Signal to noise threshold.

◆ sn_bin_count_

UInt sn_bin_count_
protected

Signal to noise bin count.

◆ sn_win_len_

double sn_win_len_
protected

Signal to noise window length.

◆ snt_

◆ use_gauss_

bool use_gauss_
protected

Whether to use Gaussian smoothing.

◆ write_sn_log_messages_

bool write_sn_log_messages_
protected

Whether to write out log messages of the SN estimator.