OpenMS
Loading...
Searching...
No Matches
CoIsolationDetector.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: Timo Sachsenberg $
6// $Authors: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/config.h>
14
15#include <string>
16#include <vector>
17
18namespace OpenMS
19{
20 class MSSpectrum;
21
37 class OPENMS_DLLAPI CoIsolationDetector
38 {
39 public:
41 struct OPENMS_DLLAPI CoIsolated
42 {
43 double mono_mz = 0.0;
44 int charge = 0;
45 double kl = 0.0;
46 };
47
49 static const std::string META_MZ;
51 static const std::string META_CHARGE;
52
66 static double isotopeKL(const MSSpectrum& ms1, double mono_mz, int charge, double tol_da, Size n_isotopes = 4);
67
81 static std::vector<CoIsolated> detect(const MSSpectrum& ms1, double window_lower, double window_upper,
82 double selected_mz, int min_charge, int max_charge, double tol_da,
83 double max_kl, Size max_n);
84
102 static Size annotate(PeakMap& exp, int min_charge, int max_charge, double tolerance, bool tolerance_ppm,
103 double max_kl, Size max_n);
104 };
105} // namespace OpenMS
Finds precursors co-isolated with the selected one in the isolation window of an MS2 spectrum.
Definition CoIsolationDetector.h:38
static std::vector< CoIsolated > detect(const MSSpectrum &ms1, double window_lower, double window_upper, double selected_mz, int min_charge, int max_charge, double tol_da, double max_kl, Size max_n)
Co-isolated precursors in the isolation window [window_lower, window_upper] of ms1.
static const std::string META_MZ
meta value of an MS2 spectrum: the monoisotopic m/z of its co-isolated precursors (DoubleList,...
Definition CoIsolationDetector.h:49
static double isotopeKL(const MSSpectrum &ms1, double mono_mz, int charge, double tol_da, Size n_isotopes=4)
Divergence of the isotope envelope at mono_mz from averagine.
static const std::string META_CHARGE
meta value of an MS2 spectrum: the charges of its co-isolated precursors (IntList,...
Definition CoIsolationDetector.h:51
static Size annotate(PeakMap &exp, int min_charge, int max_charge, double tolerance, bool tolerance_ppm, double max_kl, Size max_n)
Annotate each MS2 spectrum of exp with the precursors co-isolated with its first precursor.
a co-isolated precursor
Definition CoIsolationDetector.h:42
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
The representation of a 1D spectrum.
Definition MSSpectrum.h:45
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