Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
FeatureGroupingAlgorithmKD Class Reference

A feature grouping algorithm for unlabeled data. More...

#include <OpenMS/ANALYSIS/MAPMATCHING/FeatureGroupingAlgorithmKD.h>

Inheritance diagram for FeatureGroupingAlgorithmKD:
FeatureGroupingAlgorithm ProgressLogger DefaultParamHandler

Public Member Functions

 FeatureGroupingAlgorithmKD ()
 Default constructor. More...
 
virtual ~FeatureGroupingAlgorithmKD ()
 Destructor. More...
 
virtual void group (const std::vector< FeatureMap > &maps, ConsensusMap &out)
 Applies the algorithm to feature maps. More...
 
virtual void group (const std::vector< ConsensusMap > &maps, ConsensusMap &out)
 Applies the algorithm to consensus maps. More...
 
- Public Member Functions inherited from FeatureGroupingAlgorithm
 FeatureGroupingAlgorithm ()
 Default constructor. More...
 
virtual ~FeatureGroupingAlgorithm ()
 Destructor. More...
 
void transferSubelements (const std::vector< ConsensusMap > &maps, ConsensusMap &out) const
 Transfers subelements (grouped features) from input consensus maps to the result consensus map. 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...
 
virtual 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...
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
 ~ProgressLogger ()
 Destructor. More...
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor. More...
 
ProgressLoggeroperator= (const ProgressLogger &other)
 Assignment Operator. More...
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE! More...
 
LogType getLogType () const
 Returns the type of progress log being used. More...
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display. More...
 
void setProgress (SignedSize value) const
 Sets the current progress. More...
 
void endProgress () const
 Ends the progress display. More...
 

Static Public Member Functions

static FeatureGroupingAlgorithmcreate ()
 Creates a new instance of this class (for Factory) More...
 
static String getProductName ()
 Returns the product name (for the Factory) More...
 
- Static Public Member Functions inherited from FeatureGroupingAlgorithm
static void registerChildren ()
 Register all derived classes in this method. More...
 

Private Member Functions

 FeatureGroupingAlgorithmKD (const FeatureGroupingAlgorithmKD &)
 Copy constructor intentionally not implemented -> private. More...
 
FeatureGroupingAlgorithmKDoperator= (const FeatureGroupingAlgorithmKD &)
 Assignment operator intentionally not implemented -> private. More...
 
template<typename MapType >
void group_ (const std::vector< MapType > &input_maps, ConsensusMap &out)
 Applies the algorithm to feature or consensus maps. More...
 
void runClustering_ (const KDTreeFeatureMaps &kd_data, ConsensusMap &out)
 Run the actual clustering algorithm. More...
 
void updateClusterProxies_ (std::set< ClusterProxyKD > &potential_clusters, std::vector< ClusterProxyKD > &cluster_for_idx, const std::set< Size > &update_these, const std::vector< Int > &assigned, const KDTreeFeatureMaps &kd_data)
 Update maximum possible sizes of potential consensus features for indices specified in update_these. More...
 
ClusterProxyKD computeBestClusterForCenter_ (Size i, std::vector< Size > &cf_indices, const std::vector< Int > &assigned, const KDTreeFeatureMaps &kd_data) const
 Compute the current best cluster with center index i (mutates proxy and cf_indices) More...
 
void addConsensusFeature_ (const std::vector< Size > &indices, const KDTreeFeatureMaps &kd_data, ConsensusMap &out) const
 Construct consensus feature and add to out map. More...
 

Private Attributes

SignedSize progress_
 Current progress for logging. More...
 
double rt_tol_secs_
 RT tolerance. More...
 
double mz_tol_
 m/z tolerance More...
 
bool mz_ppm_
 m/z unit ppm? More...
 
FeatureDistance feature_distance_
 Feature distance functor. More...
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD, GUI, NONE }
 Possible log types. More...
 
- Protected Member Functions inherited from DefaultParamHandler
virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 
- Static Protected Member Functions inherited from ProgressLogger
static String logTypeToFactoryName_ (LogType type)
 Return the name of the factory product used for this log type. More...
 
- 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...
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImplcurrent_logger_
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

A feature grouping algorithm for unlabeled data.

The algorithm takes a number of feature or consensus maps and searches for corresponding (consensus) features across different maps.

Constructor & Destructor Documentation

◆ FeatureGroupingAlgorithmKD() [1/2]

Default constructor.

◆ ~FeatureGroupingAlgorithmKD()

virtual ~FeatureGroupingAlgorithmKD ( )
virtual

Destructor.

◆ FeatureGroupingAlgorithmKD() [2/2]

Copy constructor intentionally not implemented -> private.

Member Function Documentation

◆ addConsensusFeature_()

void addConsensusFeature_ ( const std::vector< Size > &  indices,
const KDTreeFeatureMaps kd_data,
ConsensusMap out 
) const
private

Construct consensus feature and add to out map.

◆ computeBestClusterForCenter_()

ClusterProxyKD computeBestClusterForCenter_ ( Size  i,
std::vector< Size > &  cf_indices,
const std::vector< Int > &  assigned,
const KDTreeFeatureMaps kd_data 
) const
private

Compute the current best cluster with center index i (mutates proxy and cf_indices)

◆ create()

static FeatureGroupingAlgorithm* create ( )
inlinestatic

Creates a new instance of this class (for Factory)

◆ getProductName()

static String getProductName ( )
inlinestatic

Returns the product name (for the Factory)

◆ group() [1/2]

virtual void group ( const std::vector< FeatureMap > &  maps,
ConsensusMap out 
)
virtual

Applies the algorithm to feature maps.

Exceptions
IllegalArgumentis thrown if less than two input maps are given.

Implements FeatureGroupingAlgorithm.

◆ group() [2/2]

virtual void group ( const std::vector< ConsensusMap > &  maps,
ConsensusMap out 
)
virtual

Applies the algorithm to consensus maps.

Exceptions
IllegalArgumentis thrown if less than two input maps are given.

Reimplemented from FeatureGroupingAlgorithm.

◆ group_()

void group_ ( const std::vector< MapType > &  input_maps,
ConsensusMap out 
)
private

Applies the algorithm to feature or consensus maps.

Exceptions
IllegalArgumentis thrown if less than two input maps are given.

◆ operator=()

FeatureGroupingAlgorithmKD& operator= ( const FeatureGroupingAlgorithmKD )
private

Assignment operator intentionally not implemented -> private.

◆ runClustering_()

void runClustering_ ( const KDTreeFeatureMaps kd_data,
ConsensusMap out 
)
private

Run the actual clustering algorithm.

◆ updateClusterProxies_()

void updateClusterProxies_ ( std::set< ClusterProxyKD > &  potential_clusters,
std::vector< ClusterProxyKD > &  cluster_for_idx,
const std::set< Size > &  update_these,
const std::vector< Int > &  assigned,
const KDTreeFeatureMaps kd_data 
)
private

Update maximum possible sizes of potential consensus features for indices specified in update_these.

Member Data Documentation

◆ feature_distance_

FeatureDistance feature_distance_
private

Feature distance functor.

◆ mz_ppm_

bool mz_ppm_
private

m/z unit ppm?

◆ mz_tol_

double mz_tol_
private

m/z tolerance

◆ progress_

SignedSize progress_
private

Current progress for logging.

◆ rt_tol_secs_

double rt_tol_secs_
private

RT tolerance.


OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:08 using doxygen 1.8.13