![]() |
OpenMS
|
#include <OpenMS/FEATUREFINDER/MassTraceDetection.h>
Classes | |
| struct | Apex |
| struct | PeakCandidate |
| Encapsulates peak finding logic for both up and down directions. More... | |
| struct | TraceExtensionState |
| Encapsulates trace extension state. More... | |
Public Types | |
| enum | TraceTerminationCriterion { OUTLIER , SAMPLE_RATE } |
| Trace termination criteria enum for performance optimization. More... | |
Public Types inherited from ProgressLogger | |
| enum | LogType { CMD , GUI , NONE } |
| Possible log types. More... | |
Public Member Functions | |
| MassTraceDetection () | |
| Default constructor. | |
| ~MassTraceDetection () override | |
| Default destructor. | |
Main computation methods | |
| void | run (const PeakMap &, std::vector< MassTrace > &, const Size max_traces=0) |
| void | run (PeakMap::ConstAreaIterator &begin, PeakMap::ConstAreaIterator &end, std::vector< MassTrace > &found_masstraces) |
| Invokes the run method (see above) on merely a subregion of a MSExperiment map. | |
| bool | hasFwhmMz () const |
| determine if meta array is available | |
| bool | hasFwhmIm () const |
| bool | hasCentroidIm () const |
Public Member Functions inherited from DefaultParamHandler | |
| DefaultParamHandler (const std::string &name) | |
| Constructor with name that is displayed in error messages. | |
| DefaultParamHandler (const DefaultParamHandler &rhs) | |
| Copy constructor. | |
| virtual | ~DefaultParamHandler () |
| Destructor. | |
| DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
| Assignment operator. | |
| virtual bool | operator== (const DefaultParamHandler &rhs) const |
| Equality operator. | |
| void | setParameters (const Param ¶m) |
| Sets the parameters. | |
| const Param & | getParameters () const |
| Non-mutable access to the parameters. | |
| const Param & | getDefaults () const |
| Non-mutable access to the default parameters. | |
| const std::string & | getName () const |
| Non-mutable access to the name. | |
| void | setName (const std::string &name) |
| Mutable access to the name. | |
| const std::vector< std::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. | |
| ProgressLogger & | operator= (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 std::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 methods and members | |
| bool | has_fwhm_mz_ = false |
| bool | has_fwhm_im_ = false |
| bool | has_centroid_im_ = false |
| double | mass_error_ppm_ |
| double | mass_error_da_ |
| double | noise_threshold_int_ |
| double | chrom_peak_snr_ |
| double | ion_mobility_tolerance_ |
| MassTrace::MT_QUANTMETHOD | quant_method_ |
| TraceTerminationCriterion | trace_termination_criterion_ |
| Size | trace_termination_outliers_ |
| double | min_sample_rate_ |
| double | min_trace_length_ |
| double | max_trace_length_ |
| bool | reestimate_mt_sd_ |
| int | fwhm_meta_idx_ = -1 |
| int | ion_mobility_idx_ = -1 |
| int | im_fwhm_idx_ = -1 |
| void | updateMembers_ () override |
| This method is used to update extra member variables at the end of the setParameters() method. | |
| static void | updateIterativeWeightedMean_ (const double &added_value, const double &added_intensity, double ¢roid_value, double &prev_counter, double &prev_denom) |
| allows for the iterative computation of intensity weighted of a mass trace's centroid m/z or ion mobility | |
| void | run_ (const std::vector< Apex > &chrom_apices, const Size peak_count, const PeakMap &work_exp, const std::vector< Size > &spec_offsets, std::vector< MassTrace > &found_masstraces, const Size max_traces=0) |
| The internal run method. | |
| void | getIMIndices_ (const PeakMap &spectra, int &fwhm_meta_idx, bool &has_fwhm_mz, int &im_idx, bool &has_centroid_im, int &im_fwhm_idx, bool &has_fwhm_im) const |
| Internal helper to extract and validate metadata float array indices. | |
| PeakCandidate | findBestPeak_ (const MSSpectrum &spectrum, double centroid_mz, double ftl_sd, double centroid_im=-1.0) const |
| Find the best matching peak in a spectrum considering m/z and optionally ion mobility. | |
| bool | isPeakAcceptable_ (const PeakCandidate &candidate, double centroid_mz, double ftl_sd, double centroid_im, Size spectrum_idx, const std::vector< Size > &spec_offsets, const std::vector< bool > &peak_visited) const |
| Check if peak candidate meets acceptance criteria. | |
| void | processPeak_ (const PeakCandidate &candidate, const MSSpectrum &spectrum, std::list< PeakType > ¤t_trace, std::vector< std::pair< Size, Size > > &gathered_idx, std::vector< double > &fwhms_mz, std::vector< double > &fwhms_im, double ¢roid_mz, double ¢roid_im, double &prev_counter, double &prev_denom, double &prev_counter_im, double &prev_denom_im, double &ftl_sd, double &intensity_so_far, Size spectrum_idx, bool is_upward_extension) |
| Process a single peak during trace extension. | |
| bool | isTraceValid_ (const std::list< PeakType > &trace, Size total_scans_visited, Size consecutive_missed_down, Size consecutive_missed_up) const |
| Check if a mass trace meets quality criteria. | |
Additional Inherited Members | |
Static Public Member Functions inherited from DefaultParamHandler | |
| static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const std::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< std::string > | subsections_ |
| Container for registered subsections. This member should be filled in the constructor of derived classes! | |
| std::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_ |
| ProgressLoggerImpl * | current_logger_ |
Static Protected Attributes inherited from ProgressLogger | |
| static std::atomic< int > | recursion_depth_ |
Default constructor.
|
override |
Default destructor.
|
private |
Find the best matching peak in a spectrum considering m/z and optionally ion mobility.
|
private |
Internal helper to extract and validate metadata float array indices.
|
inline |
|
inline |
|
inline |
determine if meta array is available
|
private |
Check if peak candidate meets acceptance criteria.
|
private |
Check if a mass trace meets quality criteria.
|
private |
Process a single peak during trace extension.
Main method of MassTraceDetection. Extracts mass traces of a MSExperiment and gathers them into a vector container.
| void run | ( | PeakMap::ConstAreaIterator & | begin, |
| PeakMap::ConstAreaIterator & | end, | ||
| std::vector< MassTrace > & | found_masstraces | ||
| ) |
Invokes the run method (see above) on merely a subregion of a MSExperiment map.
|
private |
The internal run method.
|
staticprotected |
allows for the iterative computation of intensity weighted of a mass trace's centroid m/z or ion mobility
|
overrideprotectedvirtual |
This method is used to update extra member variables at the end of the setParameters() method.
Also call it at the end of the derived classes' copy constructor and assignment operator.
The default implementation is empty.
Reimplemented from DefaultParamHandler.
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |