OpenMS
IMDataConverter.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- 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 
12 #include <OpenMS/CONCEPT/Types.h>
15 
16 #include <tuple>
17 #include <vector>
18 
19 namespace OpenMS
20 {
21  // forward declarations
22  namespace DataArrays
23  {
24  class FloatDataArray;
25  }
26  enum class DriftTimeUnit;
27 
32  class OPENMS_DLLAPI IMDataConverter
33  {
34  public:
47  static std::vector<PeakMap> splitByFAIMSCV(PeakMap&& exp);
48 
49 
67 
90  static std::tuple < std::vector<MSExperiment>, Math::BinContainer> splitExperimentByIonMobility(MSExperiment&& in,
91  UInt number_of_IM_bins,
92  double bin_extension_abs,
93  double mz_binning_width,
94  MZ_UNITS mz_binning_width_unit);
95 
116 
136  static void setIMUnit(DataArrays::FloatDataArray& fda, const DriftTimeUnit unit);
137 
157  static bool getIMUnit(const DataArrays::FloatDataArray& fda, DriftTimeUnit& unit);
158  };
159 
160 } //end namespace OpenMS
Float data array class.
Definition: DataArrays.h:22
This class converts PeakMaps and MSSpectra from/to different IM/FAIMS storage models.
Definition: IMDataConverter.h:33
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 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::vector< PeakMap > splitByFAIMSCV(PeakMap &&exp)
Splits a PeakMap into one PeakMap per FAIMS compensation voltage.
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:46
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:101
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