The PeakPickerMobilogram finds peaks a single mobilogram. More...
#include <OpenMS/ANALYSIS/OPENSWATH/PeakPickerMobilogram.h>
Classes | |
struct | PeakPositions |
Struct to hold peak positions. More... | |
Public Types | |
enum | FLOATINDICES { IDX_FWHM = 0 , IDX_ABUNDANCE = 1 , IDX_LEFTBORDER = 2 , IDX_RIGHTBORDER = 3 , IDX_OF_LEFTBORDER_IDX = 4 , IDX_OF_RIGHTBORDER_IDX = 5 , SIZE_OF_FLOATINDICES } |
indices into FloatDataArrays of resulting picked mobilogram More... | |
Public Member Functions | |
PeakPickerMobilogram () | |
Constructor. More... | |
~PeakPickerMobilogram () override | |
Destructor. More... | |
void | pickMobilogram (const Mobilogram &mobilogram, Mobilogram &picked_mobilogram) |
Finds peaks in a single mobilogram and annotates left/right borders. More... | |
void | pickMobilogram (Mobilogram mobilogram, Mobilogram &picked_mobilogram, Mobilogram &smoothed_mobilogram) |
Finds peaks in a single mobilogram and annotates left/right borders. More... | |
void | filterTopPeak (Mobilogram &picked_mobilogram, std::vector< Mobilogram > &mobilograms, PeakPositions &peak_pos) |
Filters a vector of mobilograms for the highest peak based on the picked mobilogram. More... | |
void | filterTopPeak (Mobilogram &picked_mobilogram, Mobilogram &mobilogram, PeakPositions &peak_pos) |
Filters a single mobilogram for the highest peak based on the picked mobilogram. More... | |
![]() | |
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... | |
DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () 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... | |
Public Attributes | |
std::vector< double > | integrated_intensities_ |
Temporary vector to hold the integrated intensities. More... | |
std::vector< Size > | left_width_ |
Temporary vector to hold the peak left widths. More... | |
std::vector< Size > | right_width_ |
Temporary vector to hold the peak right widths. More... | |
Protected Member Functions | |
void | pickMobilogram_ (const Mobilogram &mobilogram, Mobilogram &picked_mobilogram) |
void | integratePeaks_ (const Mobilogram &mobilogram) |
Compute peak area (peak integration) More... | |
Size | findClosestPeak_ (const Mobilogram &mobilogram, double target_im, Size current_peak=0) |
Helper function to find the closest peak in a mobilogram to "target_im". More... | |
void | filterPeakIntensities_ (Mobilogram &mobilogram, size_t left_index, size_t right_index) |
Helper function to filter peak intensities in a mobilogram. More... | |
void | filterPeakIntensities_ (std::vector< Mobilogram > &mobilograms, size_t left_index, size_t right_index) |
Helper function to filter peak intensities for a vector of mobilograms. More... | |
PeakPositions | filterTopPeak_ (Mobilogram &picked_mobilogram, std::vector< Mobilogram > &mobilograms) |
Filter vector of mobilograms for the highest peak based on the picked mobilogram. More... | |
PeakPositions | filterTopPeak_ (Mobilogram &picked_mobilogram, Mobilogram &mobilograms) |
Filter single mobilogram for the highest peak based on the picked mobilogram. More... | |
void | removeOverlappingPeaks_ (const Mobilogram &mobilogram, Mobilogram &picked_mobilogram) |
Helper function to remove overlapping peaks in a single Chromatogram. More... | |
void | updateMembers_ () override |
Synchronize members with param class. More... | |
![]() | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Static Protected Member Functions | |
static PeakPositions | findHighestPeak_ (const std::vector< double > intensities, const std::vector< Size > left_widths, const std::vector< Size > right_widths, const size_t im_size) |
Helper function to find the highest peak in a mobilogram. More... | |
static std::vector< double > | extractFloatValues_ (const OpenMS::DataArrays::FloatDataArray &floatDataArray) |
Helper function yo convert OpenMS FloatDataArray to a vector of doubles. More... | |
static std::vector< std::size_t > | extractIntValues_ (const OpenMS::DataArrays::FloatDataArray &floatDataArray) |
Helper function to convert OpenMS IntegerDataArray to a vector of std::size. 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... | |
PeakPickerHiRes | pp_ |
SavitzkyGolayFilter | sgolay_ |
GaussFilter | gauss_ |
![]() | |
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< String > | subsections_ |
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 void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="") |
Writes all parameters to meta values. More... | |
The PeakPickerMobilogram finds peaks a single mobilogram.
Parameters of this class are:Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
sgolay_frame_length | int | 9 | 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 | int | 3 | Order of the polynomial that is fitted. | |
gauss_width | float | 2.0e-03 | Gaussian width in seconds, estimated peak size. | |
use_gauss | string | false | false, true | Use 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 | float | 1.0 | min: 0.0 | Signal-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 | int | 1 | Signal to noise window length. | |
sn_bin_count | int | 4 | Signal to noise bin count. | |
write_sn_log_messages | string | false | true, false | Write out log messages of the signal-to-noise estimator in case of sparse windows or median in rightmost histogram bin |
remove_overlapping_peaks | string | false | false, true | Try to remove overlapping peaks during peak picking |
method | string | corrected | legacy, corrected, crawdad | Which method to choose for mobilogram peak-picking (OpenSWATH legacy on raw data, corrected picking on smoothed mobilogram). |
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.
struct OpenMS::PeakPickerMobilogram::PeakPositions |
Struct to hold peak positions.
Class Members | ||
---|---|---|
size_t | apex | |
size_t | left | |
size_t | right |
enum FLOATINDICES |
Constructor.
|
inlineoverride |
Destructor.
|
staticprotected |
Helper function yo convert OpenMS FloatDataArray to a vector of doubles.
[in] | floatDataArray | A const reference to a FloatDataArray object |
|
staticprotected |
Helper function to convert OpenMS IntegerDataArray to a vector of std::size.
[in] | floatDataArray | A const reference to an FloatDataArray object |
|
protected |
Helper function to filter peak intensities in a mobilogram.
This function takes a mobilogram and filters the peak intensities based on the left and right indices provided.
[in,out] | mobilogram | A Mobilogram object |
[in] | left_index | The left index of the peak range to filter |
[in] | right_index | The right index of the peak range to filter |
|
protected |
Helper function to filter peak intensities for a vector of mobilograms.
This function takes a vector of mobilograms and filters the peak intensities based on the left and right indices provided.
[in,out] | mobilograms | A vector of Mobilogram objects |
[in] | left_index | The left index of the peak range to filter |
[in] | right_index | The right index of the peak range to filter |
void filterTopPeak | ( | Mobilogram & | picked_mobilogram, |
Mobilogram & | mobilogram, | ||
PeakPositions & | peak_pos | ||
) |
Filters a single mobilogram for the highest peak based on the picked mobilogram.
void filterTopPeak | ( | Mobilogram & | picked_mobilogram, |
std::vector< Mobilogram > & | mobilograms, | ||
PeakPositions & | peak_pos | ||
) |
Filters a vector of mobilograms for the highest peak based on the picked mobilogram.
|
protected |
Filter single mobilogram for the highest peak based on the picked mobilogram.
|
protected |
Filter vector of mobilograms for the highest peak based on the picked mobilogram.
|
protected |
Helper function to find the closest peak in a mobilogram to "target_im".
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 mobilogram.
|
staticprotected |
Helper function to find the highest peak in a mobilogram.
This function takes the integrated intensities, left widths, right widths from the peak picker and finds the highest peak in the mobilogram. The left, apex, and right positions of the highest peak are returned.
If the peak picker found no peaks (i.e. intensities is empty), the returned PeakPositions object will have it's left, apex, and right set based on the input im_size. The peak picker could fail if the input mobilogram is sparse.
[in] | intensities | A vector of doubles containing the intensities of the peaks in the mobilogram |
[in] | left_widths | A vector of Size values containing the left widths of the peaks in the mobilogram |
[in] | right_widths | A vector of Size values containing the right widths of the peaks in the mobilogram |
[in] | im_size | The size/length of the mobilogram |
|
protected |
Compute peak area (peak integration)
void pickMobilogram | ( | const Mobilogram & | mobilogram, |
Mobilogram & | picked_mobilogram | ||
) |
Finds peaks in a single mobilogram and annotates left/right borders.
It uses a modified algorithm of the PeakPickerHiRes
This function will return a picked mobilogram
void pickMobilogram | ( | Mobilogram | mobilogram, |
Mobilogram & | picked_mobilogram, | ||
Mobilogram & | smoothed_mobilogram | ||
) |
Finds peaks in a single mobilogram and annotates left/right borders.
It uses a modified algorithm of the PeakPickerHiRes
This function will return a picked mobilogram and a smoothed mobilogram
|
protected |
|
protected |
Helper function to remove overlapping peaks in a single Chromatogram.
|
overrideprotectedvirtual |
Synchronize members with param class.
Reimplemented from DefaultParamHandler.
|
protected |
|
protected |
Width of the Gaussian smoothing.
std::vector<double> integrated_intensities_ |
Temporary vector to hold the integrated intensities.
std::vector<Size> left_width_ |
Temporary vector to hold the peak left widths.
|
protected |
Peak picker method.
|
protected |
Forced peak with.
|
protected |
|
protected |
Whether to resolve overlapping peaks.
std::vector<Size> right_width_ |
Temporary vector to hold the peak right widths.
|
protected |
|
protected |
Frame length for the SGolay smoothing.
|
protected |
Polynomial order for the SGolay smoothing.
|
protected |
Signal to noise threshold.
|
protected |
Signal to noise bin count.
|
protected |
Signal to noise window length.
|
protected |
Whether to use Gaussian smoothing.
|
protected |
Whether to write out log messages of the SN estimator.