OpenMS  2.7.0
Public Types | List of all members
MRMTransitionGroup< ChromatogramType, TransitionType > Class Template Reference

The representation of a group of transitions in a targeted proteomics experiment. More...

#include <OpenMS/KERNEL/MRMTransitionGroup.h>

Inheritance diagram for MRMTransitionGroup< ChromatogramType, TransitionType >:
[legend]
Collaboration diagram for MRMTransitionGroup< ChromatogramType, TransitionType >:
[legend]

Public Types

typedef std::vector< MRMFeatureMRMFeatureListType
 Type definitions. More...
 
typedef std::vector< TransitionType > TransitionsType
 List of Reaction Monitoring transitions (meta data) type. More...
 
typedef ChromatogramType::PeakType PeakType
 Peak type. More...
 

Public Member Functions

Constructors and Destructor
 MRMTransitionGroup ()
 Default constructor. More...
 
 MRMTransitionGroup (const MRMTransitionGroup &rhs)
 Copy Constructor. More...
 
virtual ~MRMTransitionGroup ()
 Destructor. More...
 
MRMTransitionGroupoperator= (const MRMTransitionGroup &rhs)
 
Size size () const
 
const StringgetTransitionGroupID () const
 
void setTransitionGroupID (const String &tr_gr_id)
 
Transition access
const std::vector< TransitionType > & getTransitions () const
 
std::vector< TransitionType > & getTransitionsMuteable ()
 
void addTransition (const TransitionType &transition, const String &key)
 
bool hasTransition (const String &key) const
 
const TransitionType & getTransition (const String &key)
 
(Fragment ion) chromatogram access
std::vector< ChromatogramType > & getChromatograms ()
 
const std::vector< ChromatogramType > & getChromatograms () const
 
void addChromatogram (const ChromatogramType &chromatogram, const String &key)
 
bool hasChromatogram (const String &key) const
 
ChromatogramTypegetChromatogram (const String &key)
 
const ChromatogramTypegetChromatogram (const String &key) const
 
(Precursor ion) chromatogram access
std::vector< ChromatogramType > & getPrecursorChromatograms ()
 
const std::vector< ChromatogramType > & getPrecursorChromatograms () const
 
void addPrecursorChromatogram (const ChromatogramType &chromatogram, const String &key)
 
bool hasPrecursorChromatogram (const String &key) const
 
ChromatogramTypegetPrecursorChromatogram (const String &key)
 
const ChromatogramTypegetPrecursorChromatogram (const String &key) const
 
MRM feature access (positions in RT where a peak was found across all chromatograms)
const std::vector< MRMFeature > & getFeatures () const
 
std::vector< MRMFeature > & getFeaturesMuteable ()
 
void addFeature (const MRMFeature &feature)
 
void addFeature (MRMFeature &&feature)
 

Helper functions

String tr_gr_id_
 transition group id (peak group id) More...
 
TransitionsType transitions_
 transition list More...
 
std::vector< ChromatogramTypechromatograms_
 chromatogram list More...
 
std::vector< ChromatogramTypeprecursor_chromatograms_
 precursor chromatogram list More...
 
MRMFeatureListType mrm_features_
 feature list More...
 
std::map< String, int > chromatogram_map_
 
std::map< String, int > precursor_chromatogram_map_
 
std::map< String, int > transition_map_
 
bool isInternallyConsistent () const
 Check whether internal state is consistent, e.g. same number of chromatograms and transitions are present (no runtime overhead in release mode) More...
 
bool chromatogramIdsMatch () const
 Ensure that chromatogram native ids match their keys in the map. More...
 
void getLibraryIntensity (std::vector< double > &result) const
 
MRMTransitionGroup subset (std::vector< std::string > tr_ids) const
 
MRMTransitionGroup subsetDependent (std::vector< std::string > tr_ids) const
 
const MRMFeaturegetBestFeature () const
 Returns the best feature by overall quality. More...
 
bool isMappingConsistent_ () const
 Checks that the mapping between chromatograms and transitions is consistent. More...
 

Detailed Description

template<typename ChromatogramType, typename TransitionType>
class OpenMS::MRMTransitionGroup< ChromatogramType, TransitionType >

The representation of a group of transitions in a targeted proteomics experiment.

The transition group carries information about the transitions (assays), the individual chromatograms as well as features found on these chromatograms.

On the one hand, the MRMTransitionGroup provides a convenient way to store the mapping between the individual transitions (containing the meta-data) and the actual chromatographic data points (measured data) relating to it. In addition, the structure allows storage of features found (regions of the chromatograms) where a potential elution peak was detected (see MRMFeature). Note that these features are usually found on the full collection of chromatograms and therefore relate to the whole collection of chromatograms.

Note that for the data structure to be consistent, it needs to have the same identifiers for the chromatograms as well as for the transitions.

Since not all the functions in OpenMS will work with MSChromatogram data structures, this needs to accept also MSSpectrum as a type for raw data storage.

Member Typedef Documentation

◆ MRMFeatureListType

typedef std::vector<MRMFeature> MRMFeatureListType

Type definitions.

List of MRM Features type

◆ PeakType

Peak type.

◆ TransitionsType

typedef std::vector<TransitionType> TransitionsType

List of Reaction Monitoring transitions (meta data) type.

Constructor & Destructor Documentation

◆ MRMTransitionGroup() [1/2]

MRMTransitionGroup ( )
inline

Default constructor.

◆ MRMTransitionGroup() [2/2]

MRMTransitionGroup ( const MRMTransitionGroup< ChromatogramType, TransitionType > &  rhs)
inline

Copy Constructor.

◆ ~MRMTransitionGroup()

virtual ~MRMTransitionGroup ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ addChromatogram()

void addChromatogram ( const ChromatogramType chromatogram,
const String key 
)
inline

◆ addFeature() [1/2]

void addFeature ( const MRMFeature feature)
inline

◆ addFeature() [2/2]

void addFeature ( MRMFeature &&  feature)
inline

◆ addPrecursorChromatogram()

void addPrecursorChromatogram ( const ChromatogramType chromatogram,
const String key 
)
inline

Add a precursor chromatogram (extracted from an MS1 map)

Precursor chromatograms are internally mapped using the provided key, i.e. ChromatogramType::getNativeID.

When querying for a chromatogram, make sure to use this key.

Parameters
chromatogramChromatographic traces from the MS1 map to be added

References MRMTransitionGroup< ChromatogramType, TransitionType >::precursor_chromatogram_map_, and MRMTransitionGroup< ChromatogramType, TransitionType >::precursor_chromatograms_.

Referenced by MRMTransitionGroup< ChromatogramType, TransitionType >::subset().

◆ addTransition()

void addTransition ( const TransitionType &  transition,
const String key 
)
inline

Add a transition

Transitions are internally mapped using their nativeID, i.e. TransitionType::getNativeID.

When querying for a transition, make sure to use this key.

References MRMTransitionGroup< ChromatogramType, TransitionType >::transition_map_, and MRMTransitionGroup< ChromatogramType, TransitionType >::transitions_.

Referenced by MRMTransitionGroup< ChromatogramType, TransitionType >::subset(), and MRMTransitionGroup< ChromatogramType, TransitionType >::subsetDependent().

◆ chromatogramIdsMatch()

bool chromatogramIdsMatch ( ) const
inline

◆ getBestFeature()

const MRMFeature& getBestFeature ( ) const
inline

Returns the best feature by overall quality.

For the given transition group, return the best feature as determined by the overall quality score. Requires the feature list to not be empty.

References MRMTransitionGroup< ChromatogramType, TransitionType >::getFeatures(), and OPENMS_PRECONDITION.

◆ getChromatogram() [1/2]

ChromatogramType& getChromatogram ( const String key)
inline

◆ getChromatogram() [2/2]

const ChromatogramType& getChromatogram ( const String key) const
inline

◆ getChromatograms() [1/2]

std::vector<ChromatogramType>& getChromatograms ( )
inline

◆ getChromatograms() [2/2]

const std::vector<ChromatogramType>& getChromatograms ( ) const
inline

◆ getFeatures()

const std::vector<MRMFeature>& getFeatures ( ) const
inline

◆ getFeaturesMuteable()

std::vector<MRMFeature>& getFeaturesMuteable ( )
inline

◆ getLibraryIntensity()

void getLibraryIntensity ( std::vector< double > &  result) const
inline

◆ getPrecursorChromatogram() [1/2]

ChromatogramType& getPrecursorChromatogram ( const String key)
inline

◆ getPrecursorChromatogram() [2/2]

const ChromatogramType& getPrecursorChromatogram ( const String key) const
inline

◆ getPrecursorChromatograms() [1/2]

std::vector<ChromatogramType>& getPrecursorChromatograms ( )
inline

◆ getPrecursorChromatograms() [2/2]

const std::vector<ChromatogramType>& getPrecursorChromatograms ( ) const
inline

◆ getTransition()

const TransitionType& getTransition ( const String key)
inline

◆ getTransitionGroupID()

const String& getTransitionGroupID ( ) const
inline

◆ getTransitions()

const std::vector<TransitionType>& getTransitions ( ) const
inline

◆ getTransitionsMuteable()

std::vector<TransitionType>& getTransitionsMuteable ( )
inline

◆ hasChromatogram()

bool hasChromatogram ( const String key) const
inline

◆ hasPrecursorChromatogram()

bool hasPrecursorChromatogram ( const String key) const
inline

◆ hasTransition()

bool hasTransition ( const String key) const
inline

◆ isInternallyConsistent()

bool isInternallyConsistent ( ) const
inline

◆ isMappingConsistent_()

bool isMappingConsistent_ ( ) const
inlineprotected

◆ operator=()

MRMTransitionGroup& operator= ( const MRMTransitionGroup< ChromatogramType, TransitionType > &  rhs)
inline

◆ setTransitionGroupID()

void setTransitionGroupID ( const String tr_gr_id)
inline

◆ size()

Size size ( ) const
inline

◆ subset()

MRMTransitionGroup subset ( std::vector< std::string >  tr_ids) const
inline

◆ subsetDependent()

MRMTransitionGroup subsetDependent ( std::vector< std::string >  tr_ids) const
inline

Member Data Documentation

◆ chromatogram_map_

std::map<String, int> chromatogram_map_
protected

◆ chromatograms_

std::vector<ChromatogramType> chromatograms_
protected

◆ mrm_features_

MRMFeatureListType mrm_features_
protected

◆ precursor_chromatogram_map_

std::map<String, int> precursor_chromatogram_map_
protected

◆ precursor_chromatograms_

std::vector<ChromatogramType> precursor_chromatograms_
protected

◆ tr_gr_id_

String tr_gr_id_
protected

◆ transition_map_

std::map<String, int> transition_map_
protected

◆ transitions_

TransitionsType transitions_
protected