OpenMS
2.8.0
|
Stores a set of features, together with a 2D tree for fast search. More...
#include <OpenMS/ANALYSIS/QUANTITATION/KDTreeFeatureMaps.h>
Public Types | |
typedef KDTree::KDTree< 2, KDTreeFeatureNode > | FeatureKDTree |
2D tree on features More... | |
Public Member Functions | |
KDTreeFeatureMaps () | |
Default constructor. More... | |
template<typename MapType > | |
KDTreeFeatureMaps (const std::vector< MapType > &maps, const Param ¶m) | |
Constructor. More... | |
~KDTreeFeatureMaps () override | |
Destructor. More... | |
template<typename MapType > | |
void | addMaps (const std::vector< MapType > &maps) |
Add maps and balance kd-tree. More... | |
void | addFeature (Size mt_map_index, const BaseFeature *feature) |
Add feature. More... | |
const BaseFeature * | feature (Size i) const |
Return pointer to feature i. More... | |
double | rt (Size i) const |
RT. More... | |
double | mz (Size i) const |
m/z More... | |
float | intensity (Size i) const |
Intensity. More... | |
Int | charge (Size i) const |
Charge. More... | |
Size | mapIndex (Size i) const |
Map index. More... | |
Size | size () const |
Number of features stored. More... | |
Size | treeSize () const |
Number of points in the tree. More... | |
Size | numMaps () const |
Number of maps. More... | |
void | clear () |
Clear all data. More... | |
void | optimizeTree () |
Optimize the kD tree. More... | |
void | getNeighborhood (Size index, std::vector< Size > &result_indices, double rt_tol, double mz_tol, bool mz_ppm, bool include_features_from_same_map=false, double max_pairwise_log_fc=-1.0) const |
Fill result with indices of all features compatible (wrt. RT, m/z, map index) to the feature with index . More... | |
void | queryRegion (double rt_low, double rt_high, double mz_low, double mz_high, std::vector< Size > &result_indices, Size ignored_map_index=std::numeric_limits< Size >::max()) const |
Fill result with indices of all features within the specified boundaries. More... | |
void | applyTransformations (const std::vector< TransformationModelLowess * > &trafos) |
Apply RT transformations. 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 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... | |
Protected Member Functions | |
void | updateMembers_ () override |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
Protected Member Functions inherited from DefaultParamHandler | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes | |
std::vector< const BaseFeature * > | features_ |
Feature data. More... | |
std::vector< Size > | map_index_ |
Map indices. More... | |
std::vector< double > | rt_ |
(Potentially transformed) retention times More... | |
Size | num_maps_ |
Number of maps. More... | |
FeatureKDTree | kd_tree_ |
2D tree on features from all input maps. 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< 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 Public Member Functions inherited from DefaultParamHandler | |
static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="") |
Writes all parameters to meta values. More... | |
Stores a set of features, together with a 2D tree for fast search.
typedef KDTree::KDTree<2,KDTreeFeatureNode> FeatureKDTree |
2D tree on features
|
inline |
Default constructor.
|
inline |
Constructor.
|
inlineoverride |
Destructor.
void addFeature | ( | Size | mt_map_index, |
const BaseFeature * | feature | ||
) |
Add feature.
|
inline |
Add maps
and balance kd-tree.
References MSExperiment::begin(), and MSExperiment::end().
void applyTransformations | ( | const std::vector< TransformationModelLowess * > & | trafos | ) |
Apply RT transformations.
void clear | ( | ) |
Clear all data.
const BaseFeature* feature | ( | Size | i | ) | const |
Return pointer to feature i.
void getNeighborhood | ( | Size | index, |
std::vector< Size > & | result_indices, | ||
double | rt_tol, | ||
double | mz_tol, | ||
bool | mz_ppm, | ||
bool | include_features_from_same_map = false , |
||
double | max_pairwise_log_fc = -1.0 |
||
) | const |
Fill result
with indices of all features compatible (wrt. RT, m/z, map index) to the feature with index
.
float intensity | ( | Size | i | ) | const |
Intensity.
double mz | ( | Size | i | ) | const |
m/z
Size numMaps | ( | ) | const |
Number of maps.
void optimizeTree | ( | ) |
Optimize the kD tree.
void queryRegion | ( | double | rt_low, |
double | rt_high, | ||
double | mz_low, | ||
double | mz_high, | ||
std::vector< Size > & | result_indices, | ||
Size | ignored_map_index = std::numeric_limits< Size >::max() |
||
) | const |
Fill result
with indices of all features within the specified boundaries.
double rt | ( | Size | i | ) | const |
RT.
Size size | ( | ) | const |
Number of features stored.
Size treeSize | ( | ) | const |
Number of points in the tree.
|
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.
|
protected |
Feature data.
|
protected |
2D tree on features from all input maps.
|
protected |
Number of maps.
|
protected |
(Potentially transformed) retention times