Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

FeatureFinderAlgorithmPicked Class Template Reference
[FeatureFinder]

#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/FeatureFinderAlgorithmPicked.h>

Inheritance diagram for FeatureFinderAlgorithmPicked:

FeatureFinderAlgorithm FeatureFinderDefs FactoryProduct DefaultParamHandler

List of all members.


Detailed Description

template<class PeakType, class FeatureType>
class OpenMS::FeatureFinderAlgorithmPicked< PeakType, FeatureType >

FeatureFinderAlgorithm for picked peaks.

FeatureFinderAlgorithmPicked Parameters are explained on a separate page.

Improvement:
Mass tolerances in PPM (Marc)
Improvement:
extendMassTraces_ can be implemented more efficiently: extension in both directions from max trace (Marc)

Public Types

Type definitions
typedef FeatureFinderAlgorithm
< PeakType, FeatureType >
::MapType 
MapType
 Input map type.
typedef MapType::SpectrumType SpectrumType
typedef PeakType::CoordinateType CoordinateType
 Coordinate/Position type of peaks.
typedef PeakType::IntensityType IntensityType
 Intensity type of peaks.

Public Member Functions

 FeatureFinderAlgorithmPicked ()
 default constructor
virtual void run ()
 Main method for actual FeatureFinder.

Static Public Member Functions

static FeatureFinderAlgorithm
< PeakType, FeatureType > * 
create ()
static const String getProductName ()

Protected Member Functions

virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParam() method.
void abort_ (const String &reason)
 Writes the abort reason to the log file and counts occurences for each reason.
DoubleReal intersection_ (const Feature &f1, const Feature &f2)
const TheoreticalIsotopePatterngetIsotopeDistribution_ (DoubleReal mass)
 Returns the isotope distribution for a certain mass window.
DoubleReal findBestIsotopeFit_ (const Seed &center, UInt charge, IsotopePattern &best_pattern)
 Finds the best fitting position of the isotopic pattern estimate defined by center.
void extendMassTraces_ (const IsotopePattern &pattern, MassTraces &traces)
 Extends all mass traces of a isotope pattern in one step.
void extendMassTrace_ (MassTrace &trace, Int spectrum_index, DoubleReal mz, bool inc_rt, DoubleReal min_rt=0.0, DoubleReal max_rt=0.0)
 Extends a single mass trace in one RT direction.
template<typename SpectrumType>
UInt nearest_ (CoordinateType pos, const SpectrumType &spec, UInt start) const
 Returns the index of the peak nearest to m/z pos in spectrum spec (linear search starting from index start).
void findIsotope_ (CoordinateType pos, UInt spectrum_index, IsotopePattern &pattern, UInt pattern_index, bool debug, UInt &peak_index)
 Searches for an isotopic peak in the current spectrum and the adjacent spectra.
DoubleReal positionScore_ (CoordinateType pos1, CoordinateType pos2, DoubleReal allowed_deviation) const
 Calculates a score between 0 and 1 for the m/z deviation of two peaks.
DoubleReal isotopeScore_ (const TheoreticalIsotopePattern &isotopes, IsotopePattern &pattern, bool consider_mz_distances, bool debug)
 Calculates a score between 0 and 1 for the correlation between theoretical and found isotope pattern.
DoubleReal intensityScore_ (DoubleReal intensity, UInt spectrum, UInt peak)
DoubleReal intensityScore_ (UInt rt_bin, UInt mz_bin, DoubleReal intensity)

Static Protected Member Functions

static int gaussF_ (const gsl_vector *param, void *data, gsl_vector *f)
static int gaussDF_ (const gsl_vector *param, void *data, gsl_matrix *J)
static int gaussFDF_ (const gsl_vector *param, void *data, gsl_vector *f, gsl_matrix *J)

Protected Attributes

std::ofstream log_
 Output stream for log/debug info.
std::map< String, UIntaborts_
 Array of abort reasons.
std::vector< std::vector
< PeakInfo > > 
info_
 Precalculated information for each peak.
std::vector
< TheoreticalIsotopePattern
isotope_distributions_
 Vector of precalculated isotope distributions for several mass winows.
Members for parameters often needed in methods
DoubleReal pattern_tolerance_
 Stores mass_trace:mz_tolerance.
DoubleReal trace_tolerance_
 Stores isotopic_pattern:mz_tolerance.
UInt min_spectra_
 Number of spectra that have to show the same mass (for finding a mass trace).
UInt max_missing_trace_peaks_
 Stores mass_trace:max_missing.
DoubleReal slope_bound_
 Max slope of mass trace intensities.
DoubleReal intensity_percentage_
 Isotope pattern intensity contribution of required peaks.
DoubleReal intensity_percentage_optional_
 Isotope pattern intensity contribution of optional peaks.
DoubleReal optional_fit_improvement_
 Minimal imrovment for leaving out optional isotope.
DoubleReal mass_window_width_
 Width of the isotope pattern mass bins.
UInt intensity_bins_
 Number of bins (in RT and MZ) for intensity significance estimation.
DoubleReal min_isotope_fit_
 Mimimum isotope pattern fit for a feature.
DoubleReal min_trace_score_
 Minimum quality of a traces.
Members for intensity significance estimation
DoubleReal intensity_rt_step_
 RT bin width.
DoubleReal intensity_mz_step_
 m/z bin width
std::vector< std::vector
< std::vector< DoubleReal > > > 
intensity_thresholds_
 Precalculated intensity 20-quantiles (binned).

Private Member Functions

FeatureFinderAlgorithmPickedoperator= (const FeatureFinderAlgorithmPicked &)
 Not implemented.
 FeatureFinderAlgorithmPicked (const FeatureFinderAlgorithmPicked &)
 Not implemented.

Classes

struct  IsotopePattern
 Helper structure for a found isotope pattern used in FeatureFinderAlgorithmPicked. More...
struct  MassTrace
 Helper struct for mass traces used in FeatureFinderAlgorithmPicked. More...
struct  MassTraces
 Helper struct for a collection of mass traces used in FeatureFinderAlgorithmPicked. More...
struct  PeakInfo
 Helper structure that stores precalculated information for each peak used in FeatureFinderAlgorithmPicked. More...
struct  Seed
 Helper structure for seeds used in FeatureFinderAlgorithmPicked. More...
struct  TheoreticalIsotopePattern
 Helper structure for a theoretical isotope pattern used in FeatureFinderAlgorithmPicked. More...

Member Typedef Documentation

typedef FeatureFinderAlgorithm<PeakType, FeatureType>::MapType MapType

Input map type.

Reimplemented from FeatureFinderAlgorithm.

typedef MapType::SpectrumType SpectrumType

typedef PeakType::CoordinateType CoordinateType

Coordinate/Position type of peaks.

Reimplemented from FeatureFinderAlgorithm.

typedef PeakType::IntensityType IntensityType

Intensity type of peaks.

Reimplemented from FeatureFinderAlgorithm.


Constructor & Destructor Documentation

FeatureFinderAlgorithmPicked (  )  [inline]

default constructor

FeatureFinderAlgorithmPicked ( const FeatureFinderAlgorithmPicked< PeakType, FeatureType > &   )  [private]

Not implemented.


Member Function Documentation

virtual void run (  )  [inline, virtual]

Main method for actual FeatureFinder.

Implements FeatureFinderAlgorithm.

static FeatureFinderAlgorithm<PeakType,FeatureType>* create (  )  [inline, static]

static const String getProductName (  )  [inline, static]

virtual void updateMembers_ (  )  [inline, protected, virtual]

This method is used to update extra member variables at the end of the setParam() method.

Also call it at the end of the derived classes' copy constructor and assignment operator.

The default implementation is empty.

Reimplemented from DefaultParamHandler.

void abort_ ( const String reason  )  [inline, protected]

Writes the abort reason to the log file and counts occurences for each reason.

DoubleReal intersection_ ( const Feature f1,
const Feature f2 
) [inline, protected]

Calculates the intersection between features. The value is normalized by the size of the smaller feature, so it rages from 0 to 1.

const TheoreticalIsotopePattern& getIsotopeDistribution_ ( DoubleReal  mass  )  [inline, protected]

Returns the isotope distribution for a certain mass window.

DoubleReal findBestIsotopeFit_ ( const Seed center,
UInt  charge,
IsotopePattern best_pattern 
) [inline, protected]

Finds the best fitting position of the isotopic pattern estimate defined by center.

Parameters:
center the maximum peak of the isotope distribution (contains charge as well)
charge The charge of the pattern
best_pattern Returns the indices of the isotopic peaks. If a isopopic peak is missing -1 is returned.

void extendMassTraces_ ( const IsotopePattern pattern,
MassTraces traces 
) [inline, protected]

Extends all mass traces of a isotope pattern in one step.

void extendMassTrace_ ( MassTrace trace,
Int  spectrum_index,
DoubleReal  mz,
bool  inc_rt,
DoubleReal  min_rt = 0.0,
DoubleReal  max_rt = 0.0 
) [inline, protected]

Extends a single mass trace in one RT direction.

How to use this method:

Note:
this method assumes that it extends from a local maximum.

UInt nearest_ ( CoordinateType  pos,
const SpectrumType spec,
UInt  start 
) const [inline, protected]

Returns the index of the peak nearest to m/z pos in spectrum spec (linear search starting from index start).

void findIsotope_ ( CoordinateType  pos,
UInt  spectrum_index,
IsotopePattern pattern,
UInt  pattern_index,
bool  debug,
UInt peak_index 
) [inline, protected]

Searches for an isotopic peak in the current spectrum and the adjacent spectra.

Parameters:
pos m/z position of the searched for peak
spectrum_index index of the central spectrum
pattern IsotopePattern to store found peaks
pattern_index index of the isotope in the pattern
debug Flag that turn on debug info
peak_index starting index of the search (to avoid multiple binary searches)

DoubleReal positionScore_ ( CoordinateType  pos1,
CoordinateType  pos2,
DoubleReal  allowed_deviation 
) const [inline, protected]

Calculates a score between 0 and 1 for the m/z deviation of two peaks.

DoubleReal isotopeScore_ ( const TheoreticalIsotopePattern isotopes,
IsotopePattern pattern,
bool  consider_mz_distances,
bool  debug 
) [inline, protected]

Calculates a score between 0 and 1 for the correlation between theoretical and found isotope pattern.

DoubleReal intensityScore_ ( DoubleReal  intensity,
UInt  spectrum,
UInt  peak 
) [inline, protected]

DoubleReal intensityScore_ ( UInt  rt_bin,
UInt  mz_bin,
DoubleReal  intensity 
) [inline, protected]

static int gaussF_ ( const gsl_vector *  param,
void *  data,
gsl_vector *  f 
) [inline, static, protected]

static int gaussDF_ ( const gsl_vector *  param,
void *  data,
gsl_matrix *  J 
) [inline, static, protected]

static int gaussFDF_ ( const gsl_vector *  param,
void *  data,
gsl_vector *  f,
gsl_matrix *  J 
) [inline, static, protected]

FeatureFinderAlgorithmPicked& operator= ( const FeatureFinderAlgorithmPicked< PeakType, FeatureType > &   )  [private]

Not implemented.


Member Data Documentation

std::ofstream log_ [protected]

Output stream for log/debug info.

std::map<String, UInt> aborts_ [protected]

Array of abort reasons.

DoubleReal pattern_tolerance_ [protected]

Stores mass_trace:mz_tolerance.

DoubleReal trace_tolerance_ [protected]

Stores isotopic_pattern:mz_tolerance.

UInt min_spectra_ [protected]

Number of spectra that have to show the same mass (for finding a mass trace).

UInt max_missing_trace_peaks_ [protected]

Stores mass_trace:max_missing.

DoubleReal slope_bound_ [protected]

Max slope of mass trace intensities.

DoubleReal intensity_percentage_ [protected]

Isotope pattern intensity contribution of required peaks.

DoubleReal intensity_percentage_optional_ [protected]

Isotope pattern intensity contribution of optional peaks.

DoubleReal optional_fit_improvement_ [protected]

Minimal imrovment for leaving out optional isotope.

DoubleReal mass_window_width_ [protected]

Width of the isotope pattern mass bins.

UInt intensity_bins_ [protected]

Number of bins (in RT and MZ) for intensity significance estimation.

DoubleReal min_isotope_fit_ [protected]

Mimimum isotope pattern fit for a feature.

DoubleReal min_trace_score_ [protected]

Minimum quality of a traces.

DoubleReal intensity_rt_step_ [protected]

RT bin width.

DoubleReal intensity_mz_step_ [protected]

m/z bin width

std::vector< std::vector< std::vector<DoubleReal> > > intensity_thresholds_ [protected]

Precalculated intensity 20-quantiles (binned).

std::vector< std::vector<PeakInfo> > info_ [protected]

Precalculated information for each peak.

std::vector< TheoreticalIsotopePattern > isotope_distributions_ [protected]

Vector of precalculated isotope distributions for several mass winows.


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:47 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1