The representation of a 1D spectrum. More...
#include <OpenMS/KERNEL/MSSpectrum.h>
Classes | |
| class | FloatDataArray |
| Float data array class. More... | |
| class | IntegerDataArray |
| Integer data array class. More... | |
| struct | RTLess |
| Comparator for the retention time. More... | |
| class | StringDataArray |
| String data array class. More... | |
Public Types | |
Base type definitions | |
| typedef PeakT | PeakType |
| Peak type. | |
| typedef PeakType::CoordinateType | CoordinateType |
| Coordinate (m/z) type. | |
| typedef std::vector< PeakType > | ContainerType |
| Spectrum base type. | |
| typedef std::vector < FloatDataArray > | FloatDataArrays |
| Float data array vector type. | |
| typedef std::vector < StringDataArray > | StringDataArrays |
| String data array vector type. | |
| typedef std::vector < IntegerDataArray > | IntegerDataArrays |
| Integer data array vector type. | |
Peak container iterator type definitions | |
| typedef ContainerType::iterator | Iterator |
| Mutable iterator. | |
| typedef ContainerType::const_iterator | ConstIterator |
| Non-mutable iterator. | |
| typedef ContainerType::reverse_iterator | ReverseIterator |
| Mutable reverse iterator. | |
| typedef ContainerType::const_reverse_iterator | ConstReverseIterator |
| Non-mutable reverse iterator. | |
Public Member Functions | |
| MSSpectrum () | |
| Constructor. | |
| MSSpectrum (const MSSpectrum &source) | |
| Copy constructor. | |
| ~MSSpectrum () | |
| Destructor. | |
| MSSpectrum & | operator= (const MSSpectrum &source) |
| Assignment operator. | |
| bool | operator== (const MSSpectrum &rhs) const |
| Equality operator. | |
| bool | operator!= (const MSSpectrum &rhs) const |
| Equality operator. | |
| virtual void | updateRanges () |
| void | clear (bool clear_meta_data) |
| Clears all data and meta data. | |
Accessors for meta information | |
| DoubleReal | getRT () const |
| void | setRT (DoubleReal rt) |
| Sets the absolute retention time (is seconds). | |
| UInt | getMSLevel () const |
| Returns the MS level. | |
| void | setMSLevel (UInt ms_level) |
| Sets the MS level. | |
| const String & | getName () const |
| Returns the name. | |
| void | setName (const String &name) |
| Sets the name. | |
Peak data array methods | |
These methods are used to annotate each peak in a spectrum with meta information. It is an intermediate way between storing the information in the peak's MetaInfoInterface and deriving a new peak type with members for this information. These statements should help you chose which approach to use
| |
| const FloatDataArrays & | getFloatDataArrays () const |
| Returns a const reference to the float meta data arrays. | |
| FloatDataArrays & | getFloatDataArrays () |
| Returns a mutable reference to the float meta data arrays. | |
| const StringDataArrays & | getStringDataArrays () const |
| Returns a const reference to the string meta data arrays. | |
| StringDataArrays & | getStringDataArrays () |
| Returns a mutable reference to the string meta data arrays. | |
| const IntegerDataArrays & | getIntegerDataArrays () const |
| Returns a const reference to the integer meta data arrays. | |
| IntegerDataArrays & | getIntegerDataArrays () |
| Returns a mutable reference to the integer meta data arrays. | |
Sorting peaks | |
| void | sortByIntensity (bool reverse=false) |
| Lexicographically sorts the peaks by their intensity. | |
| void | sortByPosition () |
| Lexicographically sorts the peaks by their position. | |
| bool | isSorted () const |
| Checks if all peaks are sorted with respect to ascending m/z. | |
Searching a peak or peak range | |
| Size | findNearest (CoordinateType mz) const |
| Binary search for the peak nearest to a specific m/z. | |
| Iterator | MZBegin (CoordinateType mz) |
| Binary search for peak range begin. | |
| Iterator | MZBegin (Iterator begin, CoordinateType mz, Iterator end) |
| Binary search for peak range begin. | |
| Iterator | MZEnd (CoordinateType mz) |
| Binary search for peak range end (returns the past-the-end iterator). | |
| Iterator | MZEnd (Iterator begin, CoordinateType mz, Iterator end) |
| Binary search for peak range end (returns the past-the-end iterator). | |
| ConstIterator | MZBegin (CoordinateType mz) const |
| Binary search for peak range begin. | |
| ConstIterator | MZBegin (ConstIterator begin, CoordinateType mz, ConstIterator end) const |
| Binary search for peak range begin. | |
| ConstIterator | MZEnd (CoordinateType mz) const |
| Binary search for peak range end (returns the past-the-end iterator). | |
| ConstIterator | MZEnd (ConstIterator begin, CoordinateType mz, ConstIterator end) const |
| Binary search for peak range end (returns the past-the-end iterator). | |
Protected Member Functions | |
| virtual void | clearChildIds_ () |
| Clears the persistence id of all sub-objects. | |
Protected Attributes | |
| DoubleReal | retention_time_ |
| Retention time. | |
| UInt | ms_level_ |
| MS level. | |
| String | name_ |
| Name. | |
| FloatDataArrays | float_data_arrays_ |
| Float data arrays. | |
| StringDataArrays | string_data_arrays_ |
| String data arrays. | |
| IntegerDataArrays | integer_data_arrays_ |
| Intager data arrays. | |
The representation of a 1D spectrum.
It contains peak data and metadata about specific instrument settings, acquisition settings, description of the meta values used in the peaks and precursor info (SpectrumSettings).
Several MSSpectrum instances are contained in a peak map (MSExperiment), which is essentially a vector of spectra with additional information about the experiment.
Precursor info from SpectrumSettings should only be used if this spectrum is a tandem-MS spectrum. The precursor spectrum is the first spectrum in MSExperiment, that has a lower MS-level than the current spectrum.
| typedef ContainerType::const_iterator ConstIterator |
Non-mutable iterator.
| typedef ContainerType::const_reverse_iterator ConstReverseIterator |
Non-mutable reverse iterator.
| typedef std::vector<PeakType> ContainerType |
Spectrum base type.
Coordinate (m/z) type.
| typedef std::vector<FloatDataArray> FloatDataArrays |
Float data array vector type.
| typedef std::vector<IntegerDataArray> IntegerDataArrays |
Integer data array vector type.
| typedef ContainerType::iterator Iterator |
Mutable iterator.
| typedef ContainerType::reverse_iterator ReverseIterator |
Mutable reverse iterator.
| typedef std::vector<StringDataArray> StringDataArrays |
String data array vector type.
| MSSpectrum | ( | ) | [inline] |
Constructor.
| MSSpectrum | ( | const MSSpectrum< PeakT > & | source | ) | [inline] |
Copy constructor.
| ~MSSpectrum | ( | ) | [inline] |
Destructor.
| 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 MSSpectrum< RichPeak1D >::clear(), IDEvaluationBase::getPoints(), XMassFile::load(), TwoDOptimization::optimizeRegionsScanwise_(), and PeakPickerHiRes::pick().
| virtual void clearChildIds_ | ( | ) | [inline, protected, virtual] |
Clears the persistence id of all sub-objects.
Implements PersistentObject.
Reimplemented in BinnedSpectrum.
| Size findNearest | ( | CoordinateType | mz | ) | const [inline] |
Binary search for the peak nearest to a specific m/z.
| mz | The searched for mass-to-charge ratio searched |
| Exception::Precondition | is thrown if the spectrum is empty (not only in debug mode) |
Referenced by FeatureFinderAlgorithmPicked< PeakType, FeatureType >::findIsotope_(), and FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().
| const FloatDataArrays& getFloatDataArrays | ( | ) | const [inline] |
Returns a const reference to the float meta data arrays.
Referenced by MetaDataBrowser::add(), MzDataHandler< MapType >::characters(), MzMLHandler< MapType >::fillData_(), MzDataHandler< MapType >::fillData_(), TwoDOptimization::optimizeRegionsScanwise_(), DataFilters::passes(), MzDataHandler< MapType >::startElement(), MzMLHandler< MapType >::writeTo(), and MzDataHandler< MapType >::writeTo().
| FloatDataArrays& getFloatDataArrays | ( | ) | [inline] |
Returns a mutable reference to the float meta data arrays.
| IntegerDataArrays& getIntegerDataArrays | ( | ) | [inline] |
Returns a mutable reference to the integer meta data arrays.
| const IntegerDataArrays& getIntegerDataArrays | ( | ) | const [inline] |
Returns a const reference to the integer meta data arrays.
Referenced by MetaDataBrowser::add(), MzMLHandler< MapType >::fillData_(), DataFilters::passes(), and MzMLHandler< MapType >::writeTo().
| UInt getMSLevel | ( | ) | const [inline] |
Returns the MS level.
For survey scans this is 1, for MS/MS scans 2, ...
Referenced by MzDataHandler< MapType >::cvParam_(), MzMLHandler< MapType >::handleCVParam_(), PeakPickerHiRes::pick(), MzDataHandler< MapType >::startElement(), CachedmzML::writeSpectrum_(), MzXMLHandler< MapType >::writeTo(), MzMLHandler< MapType >::writeTo(), and MzDataHandler< MapType >::writeTo().
| const String& getName | ( | ) | const [inline] |
Returns the name.
Referenced by PeakPickerHiRes::pick().
| DoubleReal getRT | ( | ) | const [inline] |
Referenced by IsotopeWaveletTransform< PeakType >::checkPositionForPlausibility_(), MzDataHandler< MapType >::cvParam_(), GaussFilter::filter(), IsotopeWaveletTransform< PeakType >::TransSpectrum::getRT(), MzMLHandler< MapType >::handleCVParam_(), IsotopeWaveletTransform< PeakType >::identifyCharge(), IsotopeWaveletTransform< PeakType >::initializeScan(), TOPPRNPxl::main_(), OfflinePrecursorIonSelection::makePrecursorSelectionForKnownLCMSMap(), MSSpectrum< PeakT >::RTLess::operator()(), PeakPickerHiRes::pick(), FeatureFinderAlgorithmSH< PeakType, FeatureType >::run(), FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run(), FeatureFinderAlgorithmIsotopeWavelet< PeakType, FeatureType >::run(), CachedmzML::writeSpectrum_(), MzXMLHandler< MapType >::writeTo(), MzMLHandler< MapType >::writeTo(), and MzDataHandler< MapType >::writeTo().
| const StringDataArrays& getStringDataArrays | ( | ) | const [inline] |
Returns a const reference to the string meta data arrays.
Referenced by MetaDataBrowser::add(), MzMLHandler< MapType >::fillData_(), and MzMLHandler< MapType >::writeTo().
| StringDataArrays& getStringDataArrays | ( | ) | [inline] |
Returns a mutable reference to the string meta data arrays.
| bool isSorted | ( | ) | const [inline] |
Checks if all peaks are sorted with respect to ascending m/z.
Referenced by MRMTransitionGroupPicker::pickTransitionGroup().
| ConstIterator MZBegin | ( | ConstIterator | begin, | |
| CoordinateType | mz, | |||
| ConstIterator | end | |||
| ) | const [inline] |
Binary search for peak range begin.
| Iterator MZBegin | ( | CoordinateType | mz | ) | [inline] |
Binary search for peak range begin.
Referenced by IsotopeWaveletTransform< PeakType >::checkPositionForPlausibility_(), IsotopeWaveletTransform< PeakType >::checkPPMTheoModel_(), MSSpectrum< RichPeak1D >::findNearest(), IsotopeWaveletTransform< PeakType >::identifyCharge(), IsotopeWaveletTransform< PeakType >::initializeScan(), IsotopeWaveletTransform< PeakType >::mapSeeds2Features(), IsotopeWaveletTransform< PeakType >::TransSpectrum::MZBegin(), and IsotopeWaveletTransform< PeakType >::scoreThis_().
| Iterator MZBegin | ( | Iterator | begin, | |
| CoordinateType | mz, | |||
| Iterator | end | |||
| ) | [inline] |
Binary search for peak range begin.
| ConstIterator MZBegin | ( | CoordinateType | mz | ) | const [inline] |
Binary search for peak range begin.
| Iterator MZEnd | ( | CoordinateType | mz | ) | [inline] |
Binary search for peak range end (returns the past-the-end iterator).
Referenced by IsotopeWaveletTransform< PeakType >::identifyCharge(), IsotopeWaveletTransform< PeakType >::initializeScan(), and IsotopeWaveletTransform< PeakType >::TransSpectrum::MZEnd().
| ConstIterator MZEnd | ( | CoordinateType | mz | ) | const [inline] |
Binary search for peak range end (returns the past-the-end iterator).
| Iterator MZEnd | ( | Iterator | begin, | |
| CoordinateType | mz, | |||
| Iterator | end | |||
| ) | [inline] |
Binary search for peak range end (returns the past-the-end iterator).
| ConstIterator MZEnd | ( | ConstIterator | begin, | |
| CoordinateType | mz, | |||
| ConstIterator | end | |||
| ) | const [inline] |
Binary search for peak range end (returns the past-the-end iterator).
| bool operator!= | ( | const MSSpectrum< PeakT > & | rhs | ) | const [inline] |
Equality operator.
| MSSpectrum& operator= | ( | const MSSpectrum< PeakT > & | source | ) | [inline] |
Assignment operator.
Referenced by MSSpectrum< RichPeak1D >::clear(), and MSSpectrum< RichPeak1D >::operator=().
| bool operator== | ( | const MSSpectrum< PeakT > & | rhs | ) | const [inline] |
Equality operator.
Referenced by MSSpectrum< RichPeak1D >::operator!=(), and MSSpectrum< RichPeak1D >::operator==().
| void setMSLevel | ( | UInt | ms_level | ) | [inline] |
Sets the MS level.
Referenced by MzDataHandler< MapType >::cvParam_(), MzMLHandler< MapType >::handleCVParam_(), XMassFile::load(), OfflinePrecursorIonSelection::makePrecursorSelectionForKnownLCMSMap(), PeakPickerHiRes::pick(), CachedmzML::readSpectrum_(), MSExperiment< SimPointType >::set2DData(), TOPPViewBase::showSpectrumGenerationDialog(), and MzDataHandler< MapType >::startElement().
| void setName | ( | const String & | name | ) | [inline] |
Sets the name.
Referenced by XMassFile::load(), TOPPRNPxl::main_(), and PeakPickerHiRes::pick().
| void setRT | ( | DoubleReal | rt | ) | [inline] |
Sets the absolute retention time (is seconds).
Referenced by FeatureFinderAlgorithmIsotopeWavelet< PeakType, FeatureType >::createHRData(), MzDataHandler< MapType >::cvParam_(), TwoDOptimization::getRegionEndpoints_(), MzMLHandler< MapType >::handleCVParam_(), XMassFile::load(), TOPPRNPxl::main_(), OfflinePrecursorIonSelection::makePrecursorSelectionForKnownLCMSMap(), TwoDOptimization::optimize(), PeakPickerHiRes::pick(), CachedmzML::readSpectrum_(), MSExperiment< SimPointType >::RTBegin(), MSExperiment< SimPointType >::RTEnd(), and MSExperiment< SimPointType >::set2DData().
| void sortByIntensity | ( | bool | reverse = false |
) | [inline] |
Lexicographically sorts the peaks by their intensity.
Sorts the peaks according to ascending intensity. Meta data arrays will be sorted accordingly.
Referenced by IsotopeWaveletTransform< PeakType >::identifyCharge(), OfflinePrecursorIonSelection::makePrecursorSelectionForKnownLCMSMap(), and MRMTransitionGroupPicker::pickTransitionGroup().
| void sortByPosition | ( | ) | [inline] |
Lexicographically sorts the peaks by their position.
The spectrum is sorted with respect to position. Meta data arrays will be sorted accordingly.
Referenced by FeatureFinderAlgorithmIsotopeWavelet< PeakType, FeatureType >::createHRData(), MarkerIonExtractor::extractMarkerIons(), and MRMTransitionGroupPicker::pickTransitionGroup().
| virtual void updateRanges | ( | ) | [inline, virtual] |
FloatDataArrays float_data_arrays_ [protected] |
IntegerDataArrays integer_data_arrays_ [protected] |
DoubleReal retention_time_ [protected] |
StringDataArrays string_data_arrays_ [protected] |
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:55 using doxygen 1.7.1 |