OpenMS
TargetedExperiment Class Reference

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

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

Collaboration diagram for TargetedExperiment:
[legend]

Classes

struct  SummaryStatistics
 

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...
 
 TargetedExperiment (TargetedExperiment &&rhs) noexcept
 move constructor More...
 
virtual ~TargetedExperiment ()
 destructor More...
 
TargetedExperimentoperator= (const TargetedExperiment &rhs)
 assignment operator More...
 
TargetedExperimentoperator= (TargetedExperiment &&rhs) noexcept
 move 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...
 
TargetedExperimentoperator+= (const TargetedExperiment &rhs)
 Add one targeted experiment to another. More...
 
TargetedExperimentoperator+= (TargetedExperiment &&rhs)
 
void clear (bool clear_meta_data)
 Clears all data and meta data. More...
 
SummaryStatistics getSummary () const
 return summary stats about this TE. 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 CVTermListgetTargetCVTerms () 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)
 
void setProteins (std::vector< Protein > &&proteins)
 
const std::vector< Protein > & getProteins () const
 
const ProteingetProteinByRef (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)
 
void setPeptides (std::vector< Peptide > &&rhs)
 
const std::vector< Peptide > & getPeptides () const
 
bool hasPeptide (const String &ref) const
 
const PeptidegetPeptideByRef (const String &ref) const
 
bool hasCompound (const String &ref) const
 
const CompoundgetCompoundByRef (const String &ref) const
 
void addPeptide (const Peptide &rhs)
 
void setTransitions (const std::vector< ReactionMonitoringTransition > &transitions)
 set transition list More...
 
void setTransitions (std::vector< ReactionMonitoringTransition > &&transitions)
 
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< CVcvs_
 
std::vector< Contactcontacts_
 
std::vector< Publicationpublications_
 
std::vector< Instrumentinstruments_
 
CVTermList targets_
 
std::vector< Softwaresoftware_
 
std::vector< Proteinproteins_
 
std::vector< Compoundcompounds_
 
std::vector< Peptidepeptides_
 
std::vector< ReactionMonitoringTransitiontransitions_
 
std::vector< IncludeExcludeTargetinclude_targets_
 
std::vector< IncludeExcludeTargetexclude_targets_
 
std::vector< SourceFilesource_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...
 
void sortTransitionsByName ()
 Lexicographically sorts the transitions by their name. 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.


Class Documentation

◆ OpenMS::TargetedExperiment::SummaryStatistics

struct OpenMS::TargetedExperiment::SummaryStatistics
Collaboration diagram for TargetedExperiment::SummaryStatistics:
[legend]
Class Members
Size compound_count
bool contains_invalid_references
map< DecoyTransitionType, size_t > decoy_counts

target/decoy transitions

Size peptide_count
Size protein_count
Size transition_count

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/3]

default constructor

◆ TargetedExperiment() [2/3]

copy constructor

◆ TargetedExperiment() [3/3]

TargetedExperiment ( TargetedExperiment &&  rhs)
noexcept

move 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

◆ getSummary()

SummaryStatistics getSummary ( ) const

return summary stats about this TE.

◆ 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+=() [1/2]

TargetedExperiment& operator+= ( const TargetedExperiment rhs)

Add one targeted experiment to another.

Parameters
rhsThe targeted experiment to add to this one.

◆ operator+=() [2/2]

TargetedExperiment& operator+= ( TargetedExperiment &&  rhs)

◆ operator=() [1/2]

TargetedExperiment& operator= ( const TargetedExperiment rhs)

assignment operator

◆ operator=() [2/2]

TargetedExperiment& operator= ( TargetedExperiment &&  rhs)
noexcept

move 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() [1/2]

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

◆ setPeptides() [2/2]

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

◆ setProteins() [1/2]

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

◆ setProteins() [2/2]

void setProteins ( 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() [1/2]

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

set transition list

◆ setTransitions() [2/2]

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

◆ sortTransitionsByName()

void sortTransitionsByName ( )

Lexicographically sorts the transitions by their name.

◆ 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