OpenMS
Loading...
Searching...
No Matches
FeatureMapping.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Oliver Alka $
6// $Authors: Oliver Alka $
7// --------------------------------------------------------------------------
8
9#pragma once
10
15
16namespace OpenMS
17{
18
38 class OPENMS_DLLAPI FeatureMapping
39 {
40 public:
41
51 {
52 public:
53 std::vector<FeatureMap> feature_maps;
55 };
56
67 {
68 public:
70 std::map<const BaseFeature*, std::vector<size_t>> assignedMS2;
72 std::vector<size_t> unassignedMS2;
73 };
74
105 const FeatureMappingInfo& fm_info,
106 const double& precursor_mz_tolerance,
107 const double& precursor_rt_tolerance,
108 bool ppm);
109
110 };
111} // namespace OpenMS
Helper utilities for matching MS2 spectra to LC-MS features by precursor (m/z, RT).
Definition FeatureMapping.h:39
static FeatureToMs2Indices assignMS2IndexToFeature(const MSExperiment &spectra, const FeatureMappingInfo &fm_info, const double &precursor_mz_tolerance, const double &precursor_rt_tolerance, bool ppm)
Assign each MS2 spectrum to the feature whose precursor matches it best.
KDTreeFeatureMaps kd_tree
(RT, m/z) kd-tree referencing the features in feature_maps
Definition FeatureMapping.h:54
std::vector< FeatureMap > feature_maps
feature data, one map per input run
Definition FeatureMapping.h:53
std::map< const BaseFeature *, std::vector< size_t > > assignedMS2
MS2 spectrum indices grouped by the feature they were assigned to.
Definition FeatureMapping.h:70
std::vector< size_t > unassignedMS2
Indices of MS2 spectra that had a precursor but no feature inside the tolerance window.
Definition FeatureMapping.h:72
Input bundle: feature maps and a spatial index over them.
Definition FeatureMapping.h:51
Output bundle: per-feature MS2 spectrum indices + the list of unassigned MS2 spectra.
Definition FeatureMapping.h:67
Pools features from multiple maps into a single 2D kd-tree on (RT, m/z) for fast range queries.
Definition KDTreeFeatureMaps.h:51
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19