11#include <OpenMS/config.h>
35 check_defaults_ =
false;
39 template <
typename MapType>
43 check_defaults_ =
false;
54 template <
typename MapType>
55 void addMaps(
const std::vector<MapType>& maps)
57 num_maps_ = maps.size();
59 for (
Size i = 0; i < num_maps_; ++i)
64 addFeature(i, &(*it));
107 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;
110 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;
A basic LC-MS feature.
Definition BaseFeature.h:34
A base class for all classes handling default parameters.
Definition DefaultParamHandler.h:66
Stores a set of features, together with a 2D tree for fast search.
Definition KDTreeFeatureMaps.h:24
std::vector< double > rt_
(Potentially transformed) retention times
Definition KDTreeFeatureMaps.h:126
~KDTreeFeatureMaps() override
Destructor.
Definition KDTreeFeatureMaps.h:49
KDTreeFeatureMaps(const std::vector< MapType > &maps, const Param ¶m)
Constructor.
Definition KDTreeFeatureMaps.h:40
Size numMaps() const
Number of maps.
Size mapIndex(Size i) const
Map index.
FeatureKDTree kd_tree_
2D tree on features from all input maps.
Definition KDTreeFeatureMaps.h:132
std::vector< Size > map_index_
Map indices.
Definition KDTreeFeatureMaps.h:123
std::vector< const BaseFeature * > features_
Feature data.
Definition KDTreeFeatureMaps.h:120
Int charge(Size i) const
Charge.
KDTreeFeatureMaps()
Default constructor.
Definition KDTreeFeatureMaps.h:32
float intensity(Size i) const
Intensity.
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.
void applyTransformations(const std::vector< TransformationModelLowess * > &trafos)
Apply RT transformations.
double rt(Size i) const
RT.
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 ind...
KDTree::KDTree< 2, KDTreeFeatureNode > FeatureKDTree
2D tree on features
Definition KDTreeFeatureMaps.h:29
void addFeature(Size mt_map_index, const BaseFeature *feature)
Add feature.
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
const BaseFeature * feature(Size i) const
Return pointer to feature i.
void clear()
Clear all data.
Size size() const
Number of features stored.
Size num_maps_
Number of maps.
Definition KDTreeFeatureMaps.h:129
void addMaps(const std::vector< MapType > &maps)
Add maps and balance kd-tree.
Definition KDTreeFeatureMaps.h:55
double mz(Size i) const
m/z
void optimizeTree()
Optimize the kD tree.
Size treeSize() const
Number of points in the tree.
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
Iterator begin() noexcept
Base::const_iterator const_iterator
Definition MSExperiment.h:98
Management and storage of parameters / INI files.
Definition Param.h:46
int Int
Signed integer type.
Definition Types.h:72
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19