OpenMS  2.4.0
Public Types | List of all members
TargetedExperiment Class Reference

A description of a targeted experiment containing precursor and production ions. More...

#include <OpenMS/ANALYSIS/TARGETED/TargetedExperiment.h>

Public Types

typedef TargetedExperimentHelper::CV CV
 
typedef TargetedExperimentHelper::Protein Protein
 
typedef TargetedExperimentHelper::RetentionTime RetentionTime
 
typedef TargetedExperimentHelper::Compound Compound
 
typedef TargetedExperimentHelper::Peptide Peptide
 
typedef TargetedExperimentHelper::Contact Contact
 
typedef TargetedExperimentHelper::Publication Publication
 
typedef TargetedExperimentHelper::Instrument Instrument
 
typedef TargetedExperimentHelper::Prediction Prediction
 
typedef TargetedExperimentHelper::Interpretation Interpretation
 
typedef ReactionMonitoringTransition Transition
 
typedef Residue IonType
 
typedef std::map< String, const Protein * > ProteinReferenceMapType
 
typedef std::map< String, const Peptide * > PeptideReferenceMapType
 
typedef std::map< String, const Compound * > CompoundReferenceMapType
 

Public Member Functions

Constructors and destructors
 TargetedExperiment ()
 default constructor More...
 
 TargetedExperiment (const TargetedExperiment &rhs)
 copy constructor More...
 
virtual ~TargetedExperiment ()
 destructor More...
 
TargetedExperiment & operator= (const TargetedExperiment &rhs)
 assignment operator More...
 
Predicates
bool operator== (const TargetedExperiment &rhs) const
 
bool operator!= (const TargetedExperiment &rhs) const
 
TargetedExperiment operator+ (const TargetedExperiment &rhs) const
 Joins two targeted experiments. More...
 
TargetedExperiment & operator+= (const TargetedExperiment &rhs)
 Add one targeted experiment to another. More...
 
void clear (bool clear_meta_data)
 Clears all data and meta data. More...
 
Accessors
void setCVs (const std::vector< CV > &cvs)
 
const std::vector< CV > & getCVs () const
 
void addCV (const CV &cv)
 
void setContacts (const std::vector< Contact > &contacts)
 
const std::vector< Contact > & getContacts () const
 
void addContact (const Contact &contact)
 
void setPublications (const std::vector< Publication > &publications)
 
const std::vector< Publication > & getPublications () const
 
void addPublication (const Publication &publication)
 
void setTargetCVTerms (const CVTermList &cv_terms)
 
const CVTermList & getTargetCVTerms () const
 
void addTargetCVTerm (const CVTerm &cv_term)
 
void setTargetMetaValue (const String &name, const DataValue &value)
 
void setInstruments (const std::vector< Instrument > &instruments)
 
const std::vector< Instrument > & getInstruments () const
 
void addInstrument (const Instrument &instrument)
 
void setSoftware (const std::vector< Software > &software)
 
const std::vector< Software > & getSoftware () const
 
void addSoftware (const Software &software)
 
void setProteins (const std::vector< Protein > &proteins)
 
const std::vector< Protein > & getProteins () const
 
const Protein & getProteinByRef (const String &ref) const
 
bool hasProtein (const String &ref) const
 
void addProtein (const Protein &protein)
 
void setCompounds (const std::vector< Compound > &rhs)
 
const std::vector< Compound > & getCompounds () const
 
void addCompound (const Compound &rhs)
 
void setPeptides (const std::vector< Peptide > &rhs)
 
const std::vector< Peptide > & getPeptides () const
 
bool hasPeptide (const String &ref) const
 
const Peptide & getPeptideByRef (const String &ref) const
 
bool hasCompound (const String &ref) const
 
const Compound & getCompoundByRef (const String &ref) const
 
void addPeptide (const Peptide &rhs)
 
void setTransitions (const std::vector< ReactionMonitoringTransition > &transitions)
 set transition list More...
 
const std::vector< ReactionMonitoringTransition > & getTransitions () const
 returns the transition list More...
 
void addTransition (const ReactionMonitoringTransition &transition)
 adds a transition to the list More...
 
void setIncludeTargets (const std::vector< IncludeExcludeTarget > &targets)
 
const std::vector< IncludeExcludeTarget > & getIncludeTargets () const
 
void addIncludeTarget (const IncludeExcludeTarget &target)
 
void setExcludeTargets (const std::vector< IncludeExcludeTarget > &targets)
 
const std::vector< IncludeExcludeTarget > & getExcludeTargets () const
 
void addExcludeTarget (const IncludeExcludeTarget &target)
 
void setSourceFiles (const std::vector< SourceFile > &source_files)
 sets the source files More...
 
const std::vector< SourceFile > & getSourceFiles () const
 returns the source file list More...
 
void addSourceFile (const SourceFile &source_file)
 adds a source file to the list More...
 

Sorting peaks

std::vector< CV > cvs_
 
std::vector< Contact > contacts_
 
std::vector< Publication > publications_
 
std::vector< Instrument > instruments_
 
CVTermList targets_
 
std::vector< Software > software_
 
std::vector< Protein > proteins_
 
std::vector< Compound > compounds_
 
std::vector< Peptide > peptides_
 
std::vector< ReactionMonitoringTransition > transitions_
 
std::vector< IncludeExcludeTarget > include_targets_
 
std::vector< IncludeExcludeTarget > exclude_targets_
 
std::vector< SourceFile > source_files_
 
ProteinReferenceMapType protein_reference_map_
 
bool protein_reference_map_dirty_
 
PeptideReferenceMapType peptide_reference_map_
 
bool peptide_reference_map_dirty_
 
CompoundReferenceMapType compound_reference_map_
 
bool compound_reference_map_dirty_
 
void sortTransitionsByProductMZ ()
 Lexicographically sorts the transitions by their product m/z. More...
 
bool containsInvalidReferences () const
 Checks whether the data structure (and the underlying TraML file) contains invalid references. More...
 
void createProteinReferenceMap_ () const
 
void createPeptideReferenceMap_ () const
 
void createCompoundReferenceMap_ () const
 

Detailed Description

A description of a targeted experiment containing precursor and production ions.

A targeted experiment contains transitions used in SRM/MRM as well as SWATH-MS/DIA analysis using a targeted approach. This container holds descriptions of the precursors and product ions analyzed in such a targeted experiment. Generally, the precursor ions can be peptides or small molecules (for metabolomics) and each precursor has a set of product ions associated with it.

The TargetedExperiment can be stored to disk either in .traml format using the TraMLFile or in .tsv format using the TransitionTSVFile.

Member Typedef Documentation

◆ Compound

◆ CompoundReferenceMapType

typedef std::map<String, const Compound *> CompoundReferenceMapType

◆ Contact

◆ CV

◆ Instrument

◆ Interpretation

◆ IonType

typedef Residue IonType

◆ Peptide

◆ PeptideReferenceMapType

typedef std::map<String, const Peptide *> PeptideReferenceMapType

◆ Prediction

◆ Protein

◆ ProteinReferenceMapType

typedef std::map<String, const Protein *> ProteinReferenceMapType

◆ Publication

◆ RetentionTime

◆ Transition

Constructor & Destructor Documentation

◆ TargetedExperiment() [1/2]

default constructor

◆ TargetedExperiment() [2/2]

copy constructor

◆ ~TargetedExperiment()

virtual ~TargetedExperiment ( )
virtual

destructor

Member Function Documentation

◆ addCompound()

void addCompound ( const Compound &  rhs)

◆ addContact()

void addContact ( const Contact &  contact)

◆ addCV()

void addCV ( const CV &  cv)

◆ addExcludeTarget()

void addExcludeTarget ( const IncludeExcludeTarget &  target)

◆ addIncludeTarget()

void addIncludeTarget ( const IncludeExcludeTarget &  target)

◆ addInstrument()

void addInstrument ( const Instrument &  instrument)

◆ addPeptide()

void addPeptide ( const Peptide &  rhs)

◆ addProtein()

void addProtein ( const Protein &  protein)

◆ addPublication()

void addPublication ( const Publication &  publication)

◆ addSoftware()

void addSoftware ( const Software &  software)

◆ addSourceFile()

void addSourceFile ( const SourceFile &  source_file)

adds a source file to the list

◆ addTargetCVTerm()

void addTargetCVTerm ( const CVTerm &  cv_term)

◆ addTransition()

void addTransition ( const ReactionMonitoringTransition &  transition)

adds a transition to the list

◆ clear()

void clear ( bool  clear_meta_data)

Clears all data and meta data.

Parameters
clear_meta_dataIf true, all meta data is cleared in addition to the data.

◆ containsInvalidReferences()

bool containsInvalidReferences ( ) const

Checks whether the data structure (and the underlying TraML file) contains invalid references.

First checks whether all of the references are unique (protein, peptide, compound). Secondly, checks that each reference is valid and points either to a protein, peptide or compound.

Returns false if the file is valid.

◆ createCompoundReferenceMap_()

void createCompoundReferenceMap_ ( ) const
protected

◆ createPeptideReferenceMap_()

void createPeptideReferenceMap_ ( ) const
protected

◆ createProteinReferenceMap_()

void createProteinReferenceMap_ ( ) const
protected

◆ getCompoundByRef()

const Compound& getCompoundByRef ( const String &  ref) const

◆ getCompounds()

const std::vector<Compound>& getCompounds ( ) const

◆ getContacts()

const std::vector<Contact>& getContacts ( ) const

◆ getCVs()

const std::vector<CV>& getCVs ( ) const

◆ getExcludeTargets()

const std::vector<IncludeExcludeTarget>& getExcludeTargets ( ) const

◆ getIncludeTargets()

const std::vector<IncludeExcludeTarget>& getIncludeTargets ( ) const

◆ getInstruments()

const std::vector<Instrument>& getInstruments ( ) const

◆ getPeptideByRef()

const Peptide& getPeptideByRef ( const String &  ref) const

◆ getPeptides()

const std::vector<Peptide>& getPeptides ( ) const

◆ getProteinByRef()

const Protein& getProteinByRef ( const String &  ref) const

◆ getProteins()

const std::vector<Protein>& getProteins ( ) const

◆ getPublications()

const std::vector<Publication>& getPublications ( ) const

◆ getSoftware()

const std::vector<Software>& getSoftware ( ) const

◆ getSourceFiles()

const std::vector<SourceFile>& getSourceFiles ( ) const

returns the source file list

◆ getTargetCVTerms()

const CVTermList& getTargetCVTerms ( ) const

◆ getTransitions()

const std::vector<ReactionMonitoringTransition>& getTransitions ( ) const

◆ hasCompound()

bool hasCompound ( const String &  ref) const

◆ hasPeptide()

bool hasPeptide ( const String &  ref) const

◆ hasProtein()

bool hasProtein ( const String &  ref) const

◆ operator!=()

bool operator!= ( const TargetedExperiment &  rhs) const

◆ operator+()

TargetedExperiment operator+ ( const TargetedExperiment &  rhs) const

Joins two targeted experiments.

Proteins, peptides and transitions are merged (see operator+= for details).

◆ operator+=()

TargetedExperiment& operator+= ( const TargetedExperiment &  rhs)

Add one targeted experiment to another.

Parameters
rhsThe targeted experiment to add to this one.

◆ operator=()

TargetedExperiment& operator= ( const TargetedExperiment &  rhs)

assignment operator

◆ operator==()

bool operator== ( const TargetedExperiment &  rhs) const

◆ setCompounds()

void setCompounds ( const std::vector< Compound > &  rhs)

◆ setContacts()

void setContacts ( const std::vector< Contact > &  contacts)

◆ setCVs()

void setCVs ( const std::vector< CV > &  cvs)

◆ setExcludeTargets()

void setExcludeTargets ( const std::vector< IncludeExcludeTarget > &  targets)

◆ setIncludeTargets()

void setIncludeTargets ( const std::vector< IncludeExcludeTarget > &  targets)

◆ setInstruments()

void setInstruments ( const std::vector< Instrument > &  instruments)

◆ setPeptides()

void setPeptides ( const std::vector< Peptide > &  rhs)

◆ setProteins()

void setProteins ( const std::vector< Protein > &  proteins)

◆ setPublications()

void setPublications ( const std::vector< Publication > &  publications)

◆ setSoftware()

void setSoftware ( const std::vector< Software > &  software)

◆ setSourceFiles()

void setSourceFiles ( const std::vector< SourceFile > &  source_files)

sets the source files

◆ setTargetCVTerms()

void setTargetCVTerms ( const CVTermList &  cv_terms)

◆ setTargetMetaValue()

void setTargetMetaValue ( const String &  name,
const DataValue &  value 
)

◆ setTransitions()

void setTransitions ( const std::vector< ReactionMonitoringTransition > &  transitions)

set transition list

◆ sortTransitionsByProductMZ()

void sortTransitionsByProductMZ ( )

Lexicographically sorts the transitions by their product m/z.

Referenced by ChromatogramExtractor::extractChromatograms().

Member Data Documentation

◆ compound_reference_map_

CompoundReferenceMapType compound_reference_map_
mutableprotected

◆ compound_reference_map_dirty_

bool compound_reference_map_dirty_
mutableprotected

◆ compounds_

std::vector<Compound> compounds_
protected

◆ contacts_

std::vector<Contact> contacts_
protected

◆ cvs_

std::vector<CV> cvs_
protected

◆ exclude_targets_

std::vector<IncludeExcludeTarget> exclude_targets_
protected

◆ include_targets_

std::vector<IncludeExcludeTarget> include_targets_
protected

◆ instruments_

std::vector<Instrument> instruments_
protected

◆ peptide_reference_map_

PeptideReferenceMapType peptide_reference_map_
mutableprotected

◆ peptide_reference_map_dirty_

bool peptide_reference_map_dirty_
mutableprotected

◆ peptides_

std::vector<Peptide> peptides_
protected

◆ protein_reference_map_

ProteinReferenceMapType protein_reference_map_
mutableprotected

◆ protein_reference_map_dirty_

bool protein_reference_map_dirty_
mutableprotected

◆ proteins_

std::vector<Protein> proteins_
protected

◆ publications_

std::vector<Publication> publications_
protected

◆ software_

std::vector<Software> software_
protected

◆ source_files_

std::vector<SourceFile> source_files_
protected

◆ targets_

CVTermList targets_
protected

◆ transitions_

std::vector<ReactionMonitoringTransition> transitions_
protected