OpenMS
MultiplexClustering.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Lars Nilse $
6 // $Authors: Lars Nilse $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
18 
19 #include <vector>
20 #include <algorithm>
21 #include <iostream>
22 
23 namespace OpenMS
24 {
37  class OPENMS_DLLAPI MultiplexClustering :
38  public ProgressLogger
39  {
40  public:
45 
56  MultiplexClustering(const MSExperiment& exp_profile, const MSExperiment& exp_picked, const std::vector<std::vector<PeakPickerHiRes::PeakBoundary> >& boundaries, double rt_typical);
57 
68  MultiplexClustering(const MSExperiment& exp, double mz_tolerance, bool mz_tolerance_unit, double rt_typical);
69 
78  std::vector<std::map<int,GridBasedCluster> > cluster(const std::vector<MultiplexFilteredMSExperiment>& filter_results);
79 
83  class OPENMS_DLLAPI MultiplexDistance
84  {
85  public:
91  MultiplexDistance(double rt_scaling);
92 
97 
105  double operator()(const Point& p1, const Point& p2) const;
106 
107  private:
108  double rt_scaling_;
109 
110  };
111 
112  private:
116  std::vector<double> grid_spacing_mz_;
117  std::vector<double> grid_spacing_rt_;
118 
122  double rt_scaling_;
123 
127  double rt_typical_;
128 
132  //unused
133  //double rt_minimum_;
134 
135  };
136 
137 }
138 
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
scaled Euclidean distance for clustering
Definition: MultiplexClustering.h:84
double operator()(const Point &p1, const Point &p2) const
returns Euclidean distance
double rt_scaling_
Definition: MultiplexClustering.h:108
MultiplexDistance(double rt_scaling)
constructor
clusters results from multiplex filtering
Definition: MultiplexClustering.h:39
std::vector< double > grid_spacing_mz_
grid spacing for clustering
Definition: MultiplexClustering.h:116
double rt_scaling_
scaling in y-direction for clustering
Definition: MultiplexClustering.h:122
std::vector< std::map< int, GridBasedCluster > > cluster(const std::vector< MultiplexFilteredMSExperiment > &filter_results)
cluster filter results Data points are grouped into clusters. Each cluster contains data about one pe...
GridBasedCluster::Point Point
cluster centre, cluster bounding box, grid index
Definition: MultiplexClustering.h:44
double rt_typical_
typical retention time
Definition: MultiplexClustering.h:127
std::vector< double > grid_spacing_rt_
Definition: MultiplexClustering.h:117
MultiplexClustering(const MSExperiment &exp, double mz_tolerance, bool mz_tolerance_unit, double rt_typical)
constructor
MultiplexClustering(const MSExperiment &exp_profile, const MSExperiment &exp_picked, const std::vector< std::vector< PeakPickerHiRes::PeakBoundary > > &boundaries, double rt_typical)
constructor
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:27
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22