OpenMS
Loading...
Searching...
No Matches
IMDataConverter.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: Eugen Netz $
6// $Authors: Eugen Netz, Chris Bielow $
7// --------------------------------------------------------------------------
8
9#pragma once
10
15
16#include <tuple>
17#include <vector>
18#include <utility>
19
20namespace OpenMS
21{
22 // forward declarations
23 namespace DataArrays
24 {
25 class FloatDataArray;
26 }
27 enum class DriftTimeUnit;
28
33 class OPENMS_DLLAPI IMDataConverter
34 {
35 public:
58 static std::vector<std::pair<double, MSExperiment>> splitByFAIMSCV(PeakMap&& exp);
59
60
78
101 static std::tuple < std::vector<MSExperiment>, Math::BinContainer> splitExperimentByIonMobility(MSExperiment&& in,
102 UInt number_of_IM_bins,
103 double bin_extension_abs,
104 double mz_binning_width,
105 MZ_UNITS mz_binning_width_unit);
106
127
148
168 static bool getIMUnit(const DataArrays::FloatDataArray& fda, DriftTimeUnit& unit);
169 };
170
171} //end namespace OpenMS
Float data array class.
Definition DataArrays.h:25
This class converts PeakMaps and MSSpectra from/to different IM/FAIMS storage models.
Definition IMDataConverter.h:34
static std::vector< std::pair< double, MSExperiment > > splitByFAIMSCV(PeakMap &&exp)
Splits a PeakMap into one PeakMap per FAIMS compensation voltage (CV)
static void setIMUnit(DataArrays::FloatDataArray &fda, const DriftTimeUnit unit)
Convert from a Unit to a CV term and annotate is as the FDA's name. This is not very accurate (since ...
static MSExperiment reshapeIMFrameToSingle(const MSExperiment &in)
Collapses multiple MS spectra (each with its own drift time) from the same IM-frame into a single MSS...
static MSExperiment reshapeIMFrameToMany(MSSpectrum im_frame)
Split a (TimsTOF) ion mobility frame (i.e. a spectrum concatenated from multiple spectra with differe...
static std::tuple< std::vector< MSExperiment >, Math::BinContainer > splitExperimentByIonMobility(MSExperiment &&in, UInt number_of_IM_bins, double bin_extension_abs, double mz_binning_width, MZ_UNITS mz_binning_width_unit)
Bins the ion mobility range into discrete bins and creates a new MSExperiment for each IM bin.
static bool getIMUnit(const DataArrays::FloatDataArray &fda, DriftTimeUnit &unit)
Checks if the fda is an ion-mobility array and if so, returns the unit (either MILLISECOND or VSSC,...
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
std::vector< RangeBase > BinContainer
Definition MathFunctions.h:108
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
MZ_UNITS
Definition CommonEnums.h:34
DriftTimeUnit
Drift time unit for ion mobility.
Definition IMTypes.h:23