35 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHMSIMPLEST_H 
   36 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHMSIMPLEST_H 
   57   template <
class PeakType, 
class FeatureType>
 
   78       tmp.
setSectionDescription(
"seeder", 
"Settings for the seeder (Determines potential feature regions)");
 
   82       tmp.
setSectionDescription(
"extender", 
"Settings for the extender (Collects all peaks belonging to a feature)");
 
   86       tmp.
setSectionDescription(
"fitter", 
"Settings for the modefitter (Fits a model to the data determinging the probapility that they represent a feature.)");
 
   93 #ifdef DEBUG_FEATUREFINDER 
  105       params.
setValue(
"fit_algorithm", 
"simplest");
 
  115 #ifdef DEBUG_FEATUREFINDER 
  116           std::cout << 
"===============================" << std::endl;
 
  117           std::cout << 
"### Seeder (seed # " << ++seed_nr << 
")..." << std::endl;
 
  121 #ifdef DEBUG_FEATUREFINDER 
  122           std::cout << 
"seed ... " << seed.first << 
" - " << seed.second << std::endl;
 
  123           std::cout << 
"### Extender..." << std::endl;
 
  126           index_set.insert(seed);
 
  128           extender.
extend(index_set, region);
 
  130 #ifdef DEBUG_FEATUREFINDER 
  131           std::cout << 
"### ModelFitter..." << std::endl;
 
  149               if (ch >= summary.
charge.size())
 
  151                 summary.
charge.resize(ch + 1);
 
  168             std::cout << 
"UnableToFit: " << ex.
what() << std::endl;
 
  171             for (IndexSet::const_iterator it = region.begin(); it != region.end(); ++it)
 
  193         std::cout << size << 
" features were found. " << std::endl;
 
  198         std::cout << 
"FeatureFinder summary:\n" 
  199                   << 
"Correlation:\n\tminimum: " << summary.
corr_min << 
"\n\tmean: " << summary.
corr_mean 
  200                   << 
"\n\tmaximum: " << summary.
corr_max << std::endl;
 
  202         std::cout << 
"Exceptions:\n";
 
  203         for (std::map<String, UInt>::const_iterator it = summary.
exception.begin(); it != summary.
exception.end(); ++it)
 
  205           std::cout << 
"\t" << it->first << 
": " << it->second * 100 / summary.
no_exceptions << 
"% (" << it->second << 
")\n";
 
  208         std::cout << 
"Chosen mz models:\n";
 
  209         for (std::map<String, UInt>::const_iterator it = summary.
mz_model.begin(); it != summary.
mz_model.end(); ++it)
 
  211           std::cout << 
"\t" << it->first << 
": " << it->second * 100 / size << 
"% (" << it->second << 
")\n";
 
  214         std::cout << 
"Chosen mz stdevs:\n";
 
  215         for (std::map<float, UInt>::const_iterator it = summary.
mz_stdev.begin(); it != summary.
mz_stdev.end(); ++it)
 
  217           std::cout << 
"\t" << it->first << 
": " << it->second * 100 / (size - summary.
charge[0]) << 
"% (" << it->second << 
")\n";
 
  220         std::cout << 
"Charges:\n";
 
  221         for (
Size i = 1; i < summary.
charge.size(); ++i)
 
  223           if (summary.
charge[i] != 0)
 
  225             std::cout << 
"\t+" << i << 
": " << summary.
charge[i] * 100 / (size - summary.
charge[0]) << 
"% (" << summary.
charge[i] << 
")\n";
 
  251 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHMSIMPLEST_H 
virtual Param getDefaultParameters() const 
Returns the default parameters. Reimplment. 
Definition: FeatureFinderAlgorithmSimplest.h:72
UInt no_exceptions
Definition: FeatureFinderAlgorithm.h:53
const ChargeType & getCharge() const 
Non-mutable access to charge state. 
void extend(const ChargedIndexSet &seed_region, ChargedIndexSet &result_region)
return next seed 
Definition: SimpleExtender.h:127
IsotopeCluster::IndexPair IndexPair
Index to peak consisting of two UInts (scan index / peak index) 
Definition: FeatureFinderDefs.h:54
FeatureMapType * features_
Output data pointer. 
Definition: FeatureFinderAlgorithm.h:144
Param defaults_
Container for default parameters. This member should be filled in the constructor of derived classes!...
Definition: DefaultParamHandler.h:155
void setValue(const String &key, const DataValue &value, const String &description="", const StringList &tags=StringList())
Sets a value. 
A more convenient string class. 
Definition: String.h:56
const ModelDescription< 2 > & getModelDescription() const 
Non-mutable access to the model description. 
void insert(const String &prefix, const Param ¶m)
FeatureFinder * ff_
Pointer to the calling FeatureFinder that is used to access the feature flags. 
Definition: FeatureFinderAlgorithm.h:147
A 2-dimensional raw data point or peak. 
Definition: Peak2D.h:55
QualityType getOverallQuality() const 
Non-mutable access to the overall quality. 
Definition: FeatureFinderDefs.h:63
DoubleReal corr_mean
Definition: FeatureFinderAlgorithm.h:57
const MapType * map_
Input data pointer. 
Definition: FeatureFinderAlgorithm.h:141
std::map< String, UInt > mz_model
Definition: FeatureFinderAlgorithm.h:54
static const DataValue EMPTY
Empty data value for comparisons. 
Definition: DataValue.h:63
Abstract base class for FeatureFinder algorithms. 
Definition: FeatureFinderAlgorithm.h:74
void setSectionDescription(const String &key, const String &description)
Sets a description for an existing section. 
static const String getProductName()
Definition: FeatureFinderAlgorithmSimplest.h:236
std::map< float, UInt > mz_stdev
Definition: FeatureFinderAlgorithm.h:55
IndexPair nextSeed()
return the next seed 
Definition: SimpleSeeder.h:94
void setParameters(const Param ¶m)
Sets the parameters. 
The purpose of this struct is to provide definitions of classes and typedefs which are used throughou...
Definition: FeatureFinderDefs.h:51
DoubleReal corr_max
Definition: FeatureFinderAlgorithm.h:57
virtual void run()
Main method that implements the actual algorithm. 
Definition: FeatureFinderAlgorithmSimplest.h:91
void endProgress() const 
Ends the progress display. 
const DataValue & getValue(const String &key) const 
Returns a value of a parameter. 
FeatureFinderAlgorithmSimplest & operator=(const FeatureFinderAlgorithmSimplest &)
Not implemented. 
std::map< String, UInt > exception
Definition: FeatureFinderAlgorithm.h:52
virtual const char * what() const 
Returns the error message of the exception. 
const char * getName() const 
Returns the name of the exception. 
FeatureFinderAlgorithm implementation using the Simple* modules. 
Definition: FeatureFinderAlgorithmSimplest.h:58
void setDefaults(const Param &defaults, const String &prefix="", bool showMessage=false)
Insert all values of defaults and adds the prefix prefix, if the values are not already set...
std::vector< UInt > charge
Definition: FeatureFinderAlgorithm.h:56
Summary of fitting results. 
Definition: FeatureFinderAlgorithm.h:50
Simple feature extension algorithm. 
Definition: SimpleExtender.h:79
Tests a group of data points in an LC-MS map for goodness-of-fit with a 2D averagine model...
Definition: ModelFitter.h:77
bool exists(const String &key) const 
Tests if a parameter is set (expecting its fully qualified name, e.g., TextExporter:1:proteins_only) ...
Exception that is thrown if a method an invalid IndexPair is given. 
Definition: FeatureFinderDefs.h:66
An LC-MS feature. 
Definition: Feature.h:66
Management and storage of parameters / INI files. 
Definition: Param.h:69
static FeatureFinderAlgorithm< PeakType, FeatureType > * create()
Definition: FeatureFinderAlgorithmSimplest.h:231
DoubleReal corr_min
Definition: FeatureFinderAlgorithm.h:57
Exception used if an error occurred while fitting a model to a given dataset. 
Definition: Exception.h:662
index set with associated charge estimate 
Definition: IsotopeCluster.h:53
size_t Size
Size type e.g. used as variable which can hold result of size() 
Definition: Types.h:144
const Param & getParam() const 
Non-mutable access to model parameters. 
Definition: ModelDescription.h:127
bool check_defaults_
If this member is set to false no checking if parameters in done;. 
Definition: DefaultParamHandler.h:174
FeatureFinderAlgorithmSimplest()
default constructor 
Definition: FeatureFinderAlgorithmSimplest.h:65
const Flag & getPeakFlag(const IndexPair &index) const 
Returns a non-mutable reference to a peak flag. 
Definition: FeatureFinder.h:91
Simple seeding class that uses the strongest peak as next seed. 
Definition: SimpleSeeder.h:61
Feature fit(const ChargedIndexSet &index_set)
Return next feature. 
Definition: ModelFitter.h:226
const Param & getParameters() const 
Non-mutable access to the parameters.