Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Member Functions | Protected Member Functions | Protected Attributes

MSChromatogram< PeakT > Class Template Reference
[Kernel]

The representation of a chromatogram. More...

#include <OpenMS/KERNEL/MSChromatogram.h>

Inheritance diagram for MSChromatogram< PeakT >:
RangeManager< 1 > ChromatogramSettings PersistentObject MetaInfoInterface

List of all members.

Classes

class  FloatDataArray
 Float data array class. More...
class  IntegerDataArray
 Float data array class. More...
struct  MZLess
 Comparator for the retention time. More...
class  StringDataArray
 String data array class. More...

Public Types

Base type definitions

Peak type

typedef PeakT PeakType
typedef PeakType::CoordinateType CoordinateType
 Coordinate (RT) type.
typedef std::vector< PeakTypeContainerType
 Chromatogram 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

 MSChromatogram ()
 Constructor.
 MSChromatogram (const MSChromatogram &source)
 Copy constructor.
virtual ~MSChromatogram ()
 Destructor.
MSChromatogramoperator= (const MSChromatogram &source)
 Assignment operator.
bool operator== (const MSChromatogram &rhs) const
 Equality operator.
bool operator!= (const MSChromatogram &rhs) const
 Equality operator.
virtual void updateRanges ()
DoubleReal getMZ () const
 returns the mz of the product entry, makes sense especially for MRM scans
Accessors for meta information

Returns the name

const StringgetName () const
void setName (const String &name)
 Sets the name.
Peak data array methods

These methods are used to annotate each peak in a chromatogram 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

  • Access to meta info arrays is slower than to a member variable
  • Access to meta info arrays is faster than to a MetaInfoInterface
  • Meta info arrays are stored when using mzML format for storing
const FloatDataArraysgetFloatDataArrays () const
FloatDataArraysgetFloatDataArrays ()
 Returns a mutable reference to the float meta data arrays.
const StringDataArraysgetStringDataArrays () const
 Returns a const reference to the string meta data arrays.
StringDataArraysgetStringDataArrays ()
 Returns a mutable reference to the string meta data arrays.
const IntegerDataArraysgetIntegerDataArrays () const
 Returns a const reference to the integer meta data arrays.
IntegerDataArraysgetIntegerDataArrays ()
 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 RT.
Searching a peak or peak range

Size findNearest (CoordinateType rt) const
 Binary search for the peak nearest to a specific RT.
Iterator RTBegin (CoordinateType rt)
 Binary search for peak range begin.
Iterator RTBegin (Iterator begin, CoordinateType rt, Iterator end)
 Binary search for peak range begin.
Iterator RTEnd (CoordinateType rt)
 Binary search for peak range end (returns the past-the-end iterator).
Iterator RTEnd (Iterator begin, CoordinateType rt, Iterator end)
 Binary search for peak range end (returns the past-the-end iterator).
ConstIterator RTBegin (CoordinateType rt) const
 Binary search for peak range begin.
ConstIterator RTBegin (ConstIterator begin, CoordinateType rt, ConstIterator end) const
 Binary search for peak range begin.
ConstIterator RTEnd (CoordinateType rt) const
 Binary search for peak range end (returns the past-the-end iterator).
ConstIterator RTEnd (ConstIterator begin, CoordinateType rt, ConstIterator end) const
 Binary search for peak range end (returns the past-the-end iterator).
void clear (bool clear_meta_data)
 Clears all data and meta data.

Protected Member Functions

virtual void clearChildIds_ ()
 Clears the persistence id of all sub-objects.

Protected Attributes

String name_
 Name.
FloatDataArrays float_data_arrays_
 Float data arrays.
StringDataArrays string_data_arrays_
 String data arrays.
IntegerDataArrays integer_data_arrays_
 Intager data arrays.

Detailed Description

template<typename PeakT = ChromatogramPeak>
class OpenMS::MSChromatogram< PeakT >

The representation of a chromatogram.


Member Typedef Documentation

typedef ContainerType::const_iterator ConstIterator

Non-mutable iterator.

typedef ContainerType::const_reverse_iterator ConstReverseIterator

Non-mutable reverse iterator.

typedef std::vector<PeakType> ContainerType

Chromatogram base type.

Coordinate (RT) 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 PeakT PeakType
typedef ContainerType::reverse_iterator ReverseIterator

Mutable reverse iterator.

typedef std::vector<StringDataArray> StringDataArrays

String data array vector type.


Constructor & Destructor Documentation

MSChromatogram (  )  [inline]

Constructor.

MSChromatogram ( const MSChromatogram< PeakT > &  source  )  [inline]

Copy constructor.

virtual ~MSChromatogram (  )  [inline, virtual]

Destructor.


Member Function Documentation

void clear ( bool  clear_meta_data  )  [inline]

Clears all data and meta data.

Parameters:
clear_meta_data If true, all meta data is cleared in addition to the data.

Referenced by MSChromatogram< ChromatogramPeakType >::clear().

virtual void clearChildIds_ (  )  [inline, protected, virtual]

Clears the persistence id of all sub-objects.

Implements PersistentObject.

Size findNearest ( CoordinateType  rt  )  const [inline]

Binary search for the peak nearest to a specific RT.

Parameters:
rt The searched for mass-to-charge ratio searched
Returns:
Returns the index of the peak.
Note:
Make sure the chromatogram is sorted with respect to RT! Otherwise the result is undefined.
Exceptions:
Exception::Precondition is thrown if the chromatogram is empty (not only in debug mode)
const FloatDataArrays& getFloatDataArrays (  )  const [inline]

Returns a const reference to the float meta data arrays

Referenced by MzMLHandler< MapType >::fillChromatogramData_(), and MzMLHandler< 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 MzMLHandler< MapType >::fillChromatogramData_(), and MzMLHandler< MapType >::writeTo().

DoubleReal getMZ (  )  const [inline]

returns the mz of the product entry, makes sense especially for MRM scans

Referenced by MSChromatogram< PeakT >::MZLess::operator()().

const String& getName (  )  const [inline]
const StringDataArrays& getStringDataArrays (  )  const [inline]

Returns a const reference to the string meta data arrays.

Referenced by MzMLHandler< MapType >::fillChromatogramData_(), 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 RT.

bool operator!= ( const MSChromatogram< PeakT > &  rhs  )  const [inline]

Equality operator.

MSChromatogram& operator= ( const MSChromatogram< PeakT > &  source  )  [inline]
bool operator== ( const MSChromatogram< PeakT > &  rhs  )  const [inline]
Iterator RTBegin ( CoordinateType  rt  )  [inline]

Binary search for peak range begin.

Note:
Make sure the chromatogram is sorted with respect to retention time! Otherwise the result is undefined.

Referenced by MSChromatogram< ChromatogramPeakType >::findNearest().

Iterator RTBegin ( Iterator  begin,
CoordinateType  rt,
Iterator  end 
) [inline]

Binary search for peak range begin.

Note:
Make sure the chromatogram is sorted with respect to RT! Otherwise the result is undefined.
ConstIterator RTBegin ( CoordinateType  rt  )  const [inline]

Binary search for peak range begin.

Note:
Make sure the chromatogram is sorted with respect to RT! Otherwise the result is undefined.
ConstIterator RTBegin ( ConstIterator  begin,
CoordinateType  rt,
ConstIterator  end 
) const [inline]

Binary search for peak range begin.

Note:
Make sure the chromatogram is sorted with respect to RT! Otherwise the result is undefined.
ConstIterator RTEnd ( CoordinateType  rt  )  const [inline]

Binary search for peak range end (returns the past-the-end iterator).

Note:
Make sure the chromatogram is sorted with respect to RT. Otherwise the result is undefined.
ConstIterator RTEnd ( ConstIterator  begin,
CoordinateType  rt,
ConstIterator  end 
) const [inline]

Binary search for peak range end (returns the past-the-end iterator).

Note:
Make sure the chromatogram is sorted with respect to RT. Otherwise the result is undefined.
Iterator RTEnd ( Iterator  begin,
CoordinateType  rt,
Iterator  end 
) [inline]

Binary search for peak range end (returns the past-the-end iterator).

Note:
Make sure the chromatogram is sorted with respect to RT. Otherwise the result is undefined.
Iterator RTEnd ( CoordinateType  rt  )  [inline]

Binary search for peak range end (returns the past-the-end iterator).

Note:
Make sure the chromatogram is sorted with respect to RT. Otherwise the result is undefined.
void setName ( const String name  )  [inline]

Sets the name.

Referenced by MzMLHandler< MapType >::handleCVParam_().

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.

void sortByPosition (  )  [inline]

Lexicographically sorts the peaks by their position.

The chromatogram is sorted with respect to position. Meta data arrays will be sorted accordingly.

virtual void updateRanges (  )  [inline, virtual]

Member Data Documentation


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:55 using doxygen 1.7.1