Representation of a mass spectrometry experiment. More...
#include <OpenMS/KERNEL/MSExperiment.h>
Public Types | |
Base type definitions | |
| typedef PeakT | PeakType |
| Peak type. | |
| typedef ChromatogramPeakT | ChromatogramPeakType |
| Chromatogram peak type. | |
| typedef DRange< 2 > | AreaType |
| Area type. | |
| typedef PeakType::CoordinateType | CoordinateType |
| Coordinate type of peak positions. | |
| typedef PeakType::IntensityType | IntensityType |
| Intenstiy type of peaks. | |
| typedef RangeManager< 2 > | RangeManagerType |
| RangeManager type. | |
| typedef MSSpectrum< PeakType > | SpectrumType |
| Spectrum Type. | |
| typedef MSChromatogram < ChromatogramPeakType > | ChromatogramType |
| Chromatogram type. | |
| typedef std::vector< SpectrumType > | Base |
| STL base class type. | |
Iterator type definitions | |
| typedef std::vector < SpectrumType >::iterator | Iterator |
| Mutable iterator. | |
| typedef std::vector < SpectrumType > ::const_iterator | ConstIterator |
| Non-mutable iterator. | |
| typedef Internal::AreaIterator < PeakT, PeakT &, PeakT *, Iterator, typename SpectrumType::Iterator > | AreaIterator |
| Mutable area iterator type (for traversal of a rectangular subset of the peaks). | |
| typedef Internal::AreaIterator < const PeakT, const PeakT &, const PeakT *, ConstIterator, typename SpectrumType::ConstIterator > | ConstAreaIterator |
| Immutable area iterator type (for traversal of a rectangular subset of the peaks). | |
Public Member Functions | |
| MSExperiment () | |
| Constructor. | |
| MSExperiment (const MSExperiment &source) | |
| Copy constructor. | |
| MSExperiment & | operator= (const MSExperiment &source) |
| Assignment operator. | |
| MSExperiment & | operator= (const ExperimentalSettings &source) |
| Assignment operator. | |
| bool | operator== (const MSExperiment &rhs) const |
| Equality operator. | |
| bool | operator!= (const MSExperiment &rhs) const |
| Equality operator. | |
| void | reset () |
| Resets all internal values. | |
| bool | clearMetaDataArrays () |
| Clears the meta data arrays of all contained spectra (float, integer and string arrays). | |
| const ExperimentalSettings & | getExperimentalSettings () const |
| returns the meta information of this experiment (const access) | |
| ExperimentalSettings & | getExperimentalSettings () |
| returns the meta information of this experiment (mutable access) | |
| ConstIterator | getPrecursorSpectrum (ConstIterator iterator) const |
Returns the precursor spectrum of the scan pointed to by iterator. | |
| void | swap (MSExperiment &from) |
Swaps the content of this map with the content of from. | |
| void | setChromatograms (const std::vector< MSChromatogram< ChromatogramPeakType > > &chromatograms) |
| sets the chromatogram list | |
| void | addChromatogram (const MSChromatogram< ChromatogramPeakType > &chromatogram) |
| adds a chromatogram to the list | |
| const std::vector < MSChromatogram < ChromatogramPeakType > > & | getChromatograms () const |
| returns the chromatogram list | |
| const MSChromatogram < ChromatogramPeakType > | getTIC () const |
| returns the total ion chromatogram (TIC) | |
| void | clear (bool clear_meta_data) |
| Clears all data and meta data. | |
Conversion to/from 2D data | |
| template<class Container > | |
| void | get2DData (Container &cont) const |
| Reads out a 2D Spectrum. | |
| template<class Container > | |
| void | set2DData (const Container &cont) |
| Assignment of a 2D spectrum to MSExperiment. | |
Iterating ranges and areas | |
| AreaIterator | areaBegin (CoordinateType min_rt, CoordinateType max_rt, CoordinateType min_mz, CoordinateType max_mz) |
Returns an area iterator for area. | |
| AreaIterator | areaEnd () |
| Returns an invalid area iterator marking the end of an area. | |
| ConstAreaIterator | areaBeginConst (CoordinateType min_rt, CoordinateType max_rt, CoordinateType min_mz, CoordinateType max_mz) const |
Returns a non-mutable area iterator for area. | |
| ConstAreaIterator | areaEndConst () const |
| Returns an non-mutable invalid area iterator marking the end of an area. | |
| ConstIterator | RTBegin (CoordinateType rt) const |
| Fast search for spectrum range begin. | |
| ConstIterator | RTEnd (CoordinateType rt) const |
| Fast search for spectrum range end (returns the past-the-end iterator). | |
| Iterator | RTBegin (CoordinateType rt) |
| Fast search for spectrum range begin. | |
| Iterator | RTEnd (CoordinateType rt) |
| Fast search for spectrum range end (returns the past-the-end iterator). | |
Range methods | |
| |
| virtual void | updateRanges () |
| void | updateRanges (Int ms_level) |
| Updates the m/z, intensity, retention time and MS level ranges of all spectra with a certain ms level. | |
| CoordinateType | getMinMZ () const |
| returns the minimal m/z value | |
| CoordinateType | getMaxMZ () const |
| returns the maximal m/z value | |
| CoordinateType | getMinRT () const |
| returns the minimal retention time value | |
| CoordinateType | getMaxRT () const |
| returns the maximal retention time value | |
| const AreaType & | getDataRange () const |
| Returns RT and m/z range the data lies in. | |
| UInt64 | getSize () const |
| returns the total number of peaks | |
| const std::vector< UInt > & | getMSLevels () const |
| returns an array of MS levels | |
Sorting spectra and peaks | |
| void | sortSpectra (bool sort_mz=true) |
| Sorts the data points by retention time. | |
| void | sortChromatograms (bool sort_rt=true) |
| Sorts the data points of the chromatograms by m/z. | |
| bool | isSorted (bool check_mz=true) const |
| Checks if all spectra are sorted with respect to ascending RT. | |
Protected Member Functions | |
| virtual void | clearChildIds_ () |
| Clears the persistence id of all sub-objects. | |
Protected Attributes | |
| std::vector< UInt > | ms_levels_ |
| MS levels of the data. | |
| UInt64 | total_size_ |
| Number of all data points. | |
| std::vector< MSChromatogram < ChromatogramPeakType > > | chromatograms_ |
| chromatograms | |
Representation of a mass spectrometry experiment.
Contains the data and metadata of an experiment performed with an MS (or HPLC and MS).
Be carefull when changing the order of contained MSSpectrum instances, if tandem-MS data is stored in this class. The only way to find a precursor spectrum of MSSpectrum x is to search for the first spectrum before x that has a lower MS-level!
| typedef Internal::AreaIterator<PeakT, PeakT &, PeakT *, Iterator, typename SpectrumType::Iterator> AreaIterator |
Mutable area iterator type (for traversal of a rectangular subset of the peaks).
| typedef std::vector<SpectrumType> Base |
STL base class type.
| typedef ChromatogramPeakT ChromatogramPeakType |
Chromatogram peak type.
Chromatogram type.
| typedef Internal::AreaIterator<const PeakT, const PeakT &, const PeakT *, ConstIterator, typename SpectrumType::ConstIterator> ConstAreaIterator |
Immutable area iterator type (for traversal of a rectangular subset of the peaks).
| typedef std::vector<SpectrumType>::const_iterator ConstIterator |
Non-mutable iterator.
Coordinate type of peak positions.
| typedef PeakType::IntensityType IntensityType |
Intenstiy type of peaks.
| typedef std::vector<SpectrumType>::iterator Iterator |
Mutable iterator.
| typedef RangeManager<2> RangeManagerType |
RangeManager type.
| typedef MSSpectrum<PeakType> SpectrumType |
Spectrum Type.
| MSExperiment | ( | ) | [inline] |
Constructor.
| MSExperiment | ( | const MSExperiment< PeakT, ChromatogramPeakT > & | source | ) | [inline] |
Copy constructor.
| void addChromatogram | ( | const MSChromatogram< ChromatogramPeakType > & | chromatogram | ) | [inline] |
adds a chromatogram to the list
| AreaIterator areaBegin | ( | CoordinateType | min_rt, | |
| CoordinateType | max_rt, | |||
| CoordinateType | min_mz, | |||
| CoordinateType | max_mz | |||
| ) | [inline] |
Returns an area iterator for area.
| ConstAreaIterator areaBeginConst | ( | CoordinateType | min_rt, | |
| CoordinateType | max_rt, | |||
| CoordinateType | min_mz, | |||
| CoordinateType | max_mz | |||
| ) | const [inline] |
Returns a non-mutable area iterator for area.
Referenced by TOPPRNPxlXICFilter::filterByFoldChange(), and FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().
| AreaIterator areaEnd | ( | ) | [inline] |
Returns an invalid area iterator marking the end of an area.
| ConstAreaIterator areaEndConst | ( | ) | const [inline] |
Returns an non-mutable invalid area iterator marking the end of an area.
Referenced by TOPPRNPxlXICFilter::filterByFoldChange(), and FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().
| void clear | ( | bool | clear_meta_data | ) | [inline] |
Clears all data and meta data.
| clear_meta_data | If true, all meta data is cleared in addition to the data. |
Referenced by MSExperiment< SimPointType >::clear(), IDFilter::filterIdentificationsByBestNHits(), IDFilter::filterIdentificationsByProteins(), IDFilter::filterIdentificationsByScores(), IDFilter::filterIdentificationsByThresholds(), TOPPRNPxlXICFilter::main_(), PeakPickerHiRes::pickExperiment(), MSExperiment< SimPointType >::reset(), and CachedmzML::writeMetadata().
| virtual void clearChildIds_ | ( | ) | [inline, protected, virtual] |
Clears the persistence id of all sub-objects.
Implements PersistentObject.
| bool clearMetaDataArrays | ( | ) | [inline] |
Clears the meta data arrays of all contained spectra (float, integer and string arrays).
| void get2DData | ( | Container & | cont | ) | const [inline] |
Reads out a 2D Spectrum.
Container can be a PeakArray or an STL container of peaks which supports push_back(), end() and back()
Referenced by ConsensusMap::convert().
| const std::vector<MSChromatogram<ChromatogramPeakType> >& getChromatograms | ( | ) | const [inline] |
returns the chromatogram list
Referenced by TOPPBase::addDataProcessing_(), FeatureFinderAlgorithmMRM< PeakType, FeatureType >::run(), FeatureFinder::run(), FileHandler::storeExperiment(), CachedmzML::writeMemdump(), and CachedmzML::writeMetadata().
| const AreaType& getDataRange | ( | ) | const [inline] |
Returns RT and m/z range the data lies in.
RT is dimension 0, m/z is dimension 1
| const ExperimentalSettings& getExperimentalSettings | ( | ) | const [inline] |
returns the meta information of this experiment (const access)
Referenced by XMassFile::importExperimentalSettings().
| ExperimentalSettings& getExperimentalSettings | ( | ) | [inline] |
returns the meta information of this experiment (mutable access)
| CoordinateType getMaxMZ | ( | ) | const [inline] |
returns the maximal m/z value
Referenced by FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().
| CoordinateType getMaxRT | ( | ) | const [inline] |
returns the maximal retention time value
Referenced by FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().
| CoordinateType getMinMZ | ( | ) | const [inline] |
returns the minimal m/z value
Referenced by FeatureFinderAlgorithmPicked< PeakType, FeatureType >::intensityScore_(), and FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().
| CoordinateType getMinRT | ( | ) | const [inline] |
returns the minimal retention time value
Referenced by FeatureFinderAlgorithmPicked< PeakType, FeatureType >::intensityScore_(), and FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().
| const std::vector<UInt>& getMSLevels | ( | ) | const [inline] |
returns an array of MS levels
Referenced by FeatureFinder::run().
| ConstIterator getPrecursorSpectrum | ( | ConstIterator | iterator | ) | const [inline] |
Returns the precursor spectrum of the scan pointed to by iterator.
If there is no precursor scan the past-the-end iterator is returned.
| UInt64 getSize | ( | ) | const [inline] |
returns the total number of peaks
Referenced by ConsensusMap::convert(), and FeatureFinder::run().
| const MSChromatogram<ChromatogramPeakType> getTIC | ( | ) | const [inline] |
returns the total ion chromatogram (TIC)
| bool isSorted | ( | bool | check_mz = true |
) | const [inline] |
Checks if all spectra are sorted with respect to ascending RT.
| check_mz | if true, checks if all peaks are sorted with respect to ascending m/z |
Referenced by FeatureFinder::run().
| bool operator!= | ( | const MSExperiment< PeakT, ChromatogramPeakT > & | rhs | ) | const [inline] |
Equality operator.
| MSExperiment& operator= | ( | const ExperimentalSettings & | source | ) | [inline] |
Assignment operator.
| MSExperiment& operator= | ( | const MSExperiment< PeakT, ChromatogramPeakT > & | source | ) | [inline] |
Assignment operator.
Referenced by MSExperiment< SimPointType >::clear(), MSExperiment< SimPointType >::operator=(), MSExperiment< SimPointType >::reset(), and MSExperiment< SimPointType >::swap().
| bool operator== | ( | const MSExperiment< PeakT, ChromatogramPeakT > & | rhs | ) | const [inline] |
Equality operator.
Referenced by MSExperiment< SimPointType >::operator!=(), and MSExperiment< SimPointType >::operator==().
| void reset | ( | ) | [inline] |
Resets all internal values.
Referenced by InspectOutfile::getExperiment(), and FileHandler::loadExperiment().
| ConstIterator RTBegin | ( | CoordinateType | rt | ) | const [inline] |
Fast search for spectrum range begin.
Returns the first scan which has equal or higher (>=) RT than rt.
Referenced by MSExperiment< SimPointType >::areaBegin(), MSExperiment< SimPointType >::areaBeginConst(), InternalCalibration::calibrateMapGlobally(), OfflinePrecursorIonSelection::getMassRanges(), TwoDOptimization::getRegionEndpoints_(), OfflinePrecursorIonSelection::makePrecursorSelectionForKnownLCMSMap(), and FeatureFinder::run().
| Iterator RTBegin | ( | CoordinateType | rt | ) | [inline] |
Fast search for spectrum range begin.
| ConstIterator RTEnd | ( | CoordinateType | rt | ) | const [inline] |
Fast search for spectrum range end (returns the past-the-end iterator).
Returns the first scan which has higher (>) RT than rt.
Referenced by MSExperiment< SimPointType >::areaBegin(), MSExperiment< SimPointType >::areaBeginConst(), and OfflinePrecursorIonSelection::makePrecursorSelectionForKnownLCMSMap().
| Iterator RTEnd | ( | CoordinateType | rt | ) | [inline] |
Fast search for spectrum range end (returns the past-the-end iterator).
| void set2DData | ( | const Container & | cont | ) | [inline] |
Assignment of a 2D spectrum to MSExperiment.
Container can be a PeakArray or an STL container of peaks.
| Exception::Precondition | is thrown if the container is not sorted according to retention time (not only in debug mode) |
| void setChromatograms | ( | const std::vector< MSChromatogram< ChromatogramPeakType > > & | chromatograms | ) | [inline] |
sets the chromatogram list
Referenced by TOPPBase::addDataProcessing_(), CachedmzML::readMemdump(), and CachedmzML::writeMetadata().
| void sortChromatograms | ( | bool | sort_rt = true |
) | [inline] |
Sorts the data points of the chromatograms by m/z.
| sort_rt | if true, chromatograms are sorted by rt position as well |
Referenced by FeatureFinder::run().
| void sortSpectra | ( | bool | sort_mz = true |
) | [inline] |
Sorts the data points by retention time.
| sort_mz | if true, spectra are sorted by m/z position as well |
Referenced by FeatureFinder::run().
| void swap | ( | MSExperiment< PeakT, ChromatogramPeakT > & | from | ) | [inline] |
Swaps the content of this map with the content of from.
Referenced by MSExperiment< SimPointType >::swap().
| virtual void updateRanges | ( | ) | [inline, virtual] |
Referenced by ConsensusMap::convert(), and MSExperiment< SimPointType >::updateRanges().
| void updateRanges | ( | Int | ms_level | ) | [inline] |
Updates the m/z, intensity, retention time and MS level ranges of all spectra with a certain ms level.
| ms_level | MS level to consider for m/z range , RT range and intensity range (All MS levels if negative) |
std::vector<MSChromatogram<ChromatogramPeakType> > chromatograms_ [protected] |
chromatograms
Referenced by MSExperiment< SimPointType >::addChromatogram(), MSExperiment< SimPointType >::clear(), MSExperiment< SimPointType >::getChromatograms(), MSExperiment< SimPointType >::operator=(), MSExperiment< SimPointType >::operator==(), MSExperiment< SimPointType >::setChromatograms(), MSExperiment< SimPointType >::sortChromatograms(), MSExperiment< SimPointType >::swap(), and MSExperiment< SimPointType >::updateRanges().
std::vector<UInt> ms_levels_ [protected] |
UInt64 total_size_ [protected] |
Number of all data points.
Referenced by MSExperiment< SimPointType >::clear(), MSExperiment< SimPointType >::getSize(), MSExperiment< SimPointType >::operator=(), MSExperiment< SimPointType >::swap(), and MSExperiment< SimPointType >::updateRanges().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:55 using doxygen 1.7.1 |