OpenMS
ChromatogramTools Class Reference

Conversion class to convert chromatograms. More...

#include <OpenMS/KERNEL/ChromatogramTools.h>

Public Member Functions

Constructors and destructors
 ChromatogramTools ()
 default constructor More...
 
 ChromatogramTools (const ChromatogramTools &)
 copy constructor More...
 
virtual ~ChromatogramTools ()
 destructor More...
 
Accessors
template<typename ExperimentType >
void convertChromatogramsToSpectra (ExperimentType &exp)
 converts the chromatogram to a list of spectra with instrument settings More...
 
template<typename ExperimentType >
void convertSpectraToChromatograms (ExperimentType &exp, bool remove_spectra=false, bool force_conversion=false)
 converts e.g. SRM spectra to chromatograms More...
 

Detailed Description

Conversion class to convert chromatograms.

There are basically two methods implemented, conversion of chromatograms into spectra representation and vice versa.

Constructor & Destructor Documentation

◆ ChromatogramTools() [1/2]

ChromatogramTools ( )
inline

default constructor

◆ ChromatogramTools() [2/2]

ChromatogramTools ( const ChromatogramTools )
inline

copy constructor

◆ ~ChromatogramTools()

virtual ~ChromatogramTools ( )
inlinevirtual

destructor

Member Function Documentation

◆ convertChromatogramsToSpectra()

void convertChromatogramsToSpectra ( ExperimentType &  exp)
inline

converts the chromatogram to a list of spectra with instrument settings

This conversion may be necessary as most of the spectra formats do not support chromatograms, except of mzML. However, most formats support e.g. SRM chromatogram as a list of spectra with instrument settings SRM and a separate spectrum for each data point. The disadvantage of storing chromatograms in spectra is its exhaustive memory consumption.

References SpectrumSettings::getPrecursors(), ChromatogramSettings::SELECTED_ION_MONITORING_CHROMATOGRAM, ChromatogramSettings::SELECTED_REACTION_MONITORING_CHROMATOGRAM, Peak2D::setMZ(), InstrumentSettings::SIM, and InstrumentSettings::SRM.

◆ convertSpectraToChromatograms()

void convertSpectraToChromatograms ( ExperimentType &  exp,
bool  remove_spectra = false,
bool  force_conversion = false 
)
inline

converts e.g. SRM spectra to chromatograms

This conversion is necessary to convert chromatograms, e.g. from SRM or MRM experiments to real chromatograms. mzML 1.1.0 has support for chromatograms which can be stored much more efficiently than spectra based chromatograms. However, most other file formats do not support chromatograms.

Parameters
expthe experiment to be converted.
remove_spectraif set to true, the chromatogram spectra are removed from the experiment.
force_conversionConvert even if ScanMode is not SRM or if there are no precursors (e.g. GC-MS data)

References MSSpectrum::clear(), OPENMS_LOG_WARN, ChromatogramSettings::SELECTED_REACTION_MONITORING_CHROMATOGRAM, ChromatogramPeak::setIntensity(), Product::setMZ(), ChromatogramSettings::setPrecursor(), Peak2D::setRT(), ChromatogramPeak::setRT(), and InstrumentSettings::SRM.