OpenMS  2.8.0
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ProteinResolver Class Reference

Helper class for peptide and protein quantification based on feature data annotated with IDs. More...

#include <OpenMS/ANALYSIS/QUANTITATION/ProteinResolver.h>

Inheritance diagram for ProteinResolver:
[legend]
Collaboration diagram for ProteinResolver:
[legend]

Classes

struct  ISDGroup
 
struct  MSDGroup
 representation of an msd group. Contains peptides, proteins and a pointer to its ISD group More...
 
struct  PeptideEntry
 represents a peptide. First in silico. If experimental is set to true it is MS/MS derived. More...
 
struct  ProteinEntry
 represents a protein from FASTA file More...
 
struct  ResolverResult
 

Public Member Functions

 ProteinResolver ()
 
 ProteinResolver (const ProteinResolver &rhs)
 
ProteinResolveroperator= (const ProteinResolver &rhs)
 
 ~ProteinResolver () override
 
void resolveConsensus (ConsensusMap &consensus)
 Computing protein groups from peptide identifications OR consensus map. More...
 
void resolveID (std::vector< PeptideIdentification > &peptide_identifications)
 Computing protein groups from peptide identifications OR consensus map. More...
 
void countTargetDecoy (std::vector< MSDGroup > &msd_groups, ConsensusMap &consensus)
 brief More...
 
void countTargetDecoy (std::vector< MSDGroup > &msd_groups, std::vector< PeptideIdentification > &peptide_nodes)
 brief More...
 
void clearResult ()
 
void setProteinData (std::vector< FASTAFile::FASTAEntry > &protein_data)
 
const std::vector< ResolverResult > & getResults ()
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
virtual DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 

Static Public Member Functions

static const PeptideIdentificationgetPeptideIdentification (const ConsensusMap &consensus, const PeptideEntry *peptide)
 overloaded functions – return a const reference to a PeptideIdentification object or a peptideHit either from a consensusMap or a vector<PeptideIdentification> More...
 
static const PeptideHitgetPeptideHit (const ConsensusMap &consensus, const PeptideEntry *peptide)
 
static const PeptideIdentificationgetPeptideIdentification (const std::vector< PeptideIdentification > &peptide_nodes, const PeptideEntry *peptide)
 
static const PeptideHitgetPeptideHit (const std::vector< PeptideIdentification > &peptide_nodes, const PeptideEntry *peptide)
 
- Static Public Member Functions inherited from DefaultParamHandler
static void writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="")
 Writes all parameters to meta values. More...
 

Private Member Functions

void computeIntensityOfMSD_ (std::vector< MSDGroup > &msd_groups)
 
void traverseProtein_ (ProteinEntry *prot_node, MSDGroup &group)
 traverse protein and peptide nodes for building MSD groups More...
 
void traversePeptide_ (PeptideEntry *pep_node, MSDGroup &group)
 
Size findPeptideEntry_ (String seq, std::vector< PeptideEntry > &nodes)
 searches given sequence in all nodes and returns its index or nodes.size() if not found. More...
 
Size binarySearchNodes_ (String &seq, std::vector< PeptideEntry > &nodes, Size start, Size end)
 helper function for findPeptideEntry. More...
 
Size includeMSMSPeptides_ (std::vector< PeptideIdentification > &peptide_identifications, std::vector< PeptideEntry > &peptide_nodes)
 includes all MS/MS derived peptides into the graph –idXML More...
 
Size includeMSMSPeptides_ (ConsensusMap &consensus, std::vector< PeptideEntry > &peptide_nodes)
 
void reindexingNodes_ (std::vector< MSDGroup > &msd_groups, std::vector< Size > &reindexed_proteins, std::vector< Size > &reindexed_peptides)
 Proteins and Peptides get reindexed, based on whether they belong to msd groups or not. Indexes of Proteins which are in an ISD group but in none of the MSD groups will not be used anymore. More...
 
void primaryProteins_ (std::vector< PeptideEntry > &peptide_nodes, std::vector< Size > &reindexed_peptides)
 marks Proteins which have a unique peptide as primary. Uses reindexed vector, thus reindexingNodes has to be called before. More...
 
void buildingMSDGroups_ (std::vector< MSDGroup > &msd_groups, std::vector< ISDGroup > &isd_groups)
 
void buildingISDGroups_ (std::vector< ProteinEntry > &protein_nodes, std::vector< PeptideEntry > &peptide_nodes, std::vector< ISDGroup > &isd_groups)
 

Private Attributes

std::vector< ResolverResultresolver_result_
 
std::vector< FASTAFile::FASTAEntryprotein_data_
 

Additional Inherited Members

- Protected Member Functions inherited from DefaultParamHandler
virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 

Detailed Description

Helper class for peptide and protein quantification based on feature data annotated with IDs.

This class is used by ProteinResolver . See there for further documentation.


Class Documentation

◆ OpenMS::ProteinResolver::ISDGroup

struct OpenMS::ProteinResolver::ISDGroup
Collaboration diagram for ProteinResolver::ISDGroup:
[legend]
Class Members
Size index
list< Size > msd_groups
list< PeptideEntry * > peptides
list< ProteinEntry * > proteins

◆ OpenMS::ProteinResolver::MSDGroup

struct OpenMS::ProteinResolver::MSDGroup

representation of an msd group. Contains peptides, proteins and a pointer to its ISD group

Collaboration diagram for ProteinResolver::MSDGroup:
[legend]
Class Members
Size index
float intensity intensity of the MSD Group. Defined as the median of the peptide intensities.
ISDGroup * isd_group
Size number_of_decoy
Size number_of_target
Size number_of_target_plus_decoy
list< PeptideEntry * > peptides
list< ProteinEntry * > proteins

◆ OpenMS::ProteinResolver::PeptideEntry

struct OpenMS::ProteinResolver::PeptideEntry

represents a peptide. First in silico. If experimental is set to true it is MS/MS derived.

Collaboration diagram for ProteinResolver::PeptideEntry:
[legend]
Class Members
bool experimental
Size index
float intensity
Size isd_group
Size msd_group
String origin
Size peptide_hit
Size peptide_identification
list< ProteinEntry * > proteins
String sequence
bool traversed

Constructor & Destructor Documentation

◆ ProteinResolver() [1/2]

◆ ProteinResolver() [2/2]

ProteinResolver ( const ProteinResolver rhs)

◆ ~ProteinResolver()

~ProteinResolver ( )
override

Member Function Documentation

◆ binarySearchNodes_()

Size binarySearchNodes_ ( String seq,
std::vector< PeptideEntry > &  nodes,
Size  start,
Size  end 
)
private

helper function for findPeptideEntry.

◆ buildingISDGroups_()

void buildingISDGroups_ ( std::vector< ProteinEntry > &  protein_nodes,
std::vector< PeptideEntry > &  peptide_nodes,
std::vector< ISDGroup > &  isd_groups 
)
private

◆ buildingMSDGroups_()

void buildingMSDGroups_ ( std::vector< MSDGroup > &  msd_groups,
std::vector< ISDGroup > &  isd_groups 
)
private

◆ clearResult()

void clearResult ( )

◆ computeIntensityOfMSD_()

void computeIntensityOfMSD_ ( std::vector< MSDGroup > &  msd_groups)
private

◆ countTargetDecoy() [1/2]

void countTargetDecoy ( std::vector< MSDGroup > &  msd_groups,
ConsensusMap consensus 
)

brief

Parameters
msd_groups
consensus

◆ countTargetDecoy() [2/2]

void countTargetDecoy ( std::vector< MSDGroup > &  msd_groups,
std::vector< PeptideIdentification > &  peptide_nodes 
)

brief

Parameters
msd_groups
peptide_nodes

◆ findPeptideEntry_()

Size findPeptideEntry_ ( String  seq,
std::vector< PeptideEntry > &  nodes 
)
private

searches given sequence in all nodes and returns its index or nodes.size() if not found.

◆ getPeptideHit() [1/2]

static const PeptideHit& getPeptideHit ( const ConsensusMap consensus,
const PeptideEntry peptide 
)
static

◆ getPeptideHit() [2/2]

static const PeptideHit& getPeptideHit ( const std::vector< PeptideIdentification > &  peptide_nodes,
const PeptideEntry peptide 
)
static

◆ getPeptideIdentification() [1/2]

static const PeptideIdentification& getPeptideIdentification ( const ConsensusMap consensus,
const PeptideEntry peptide 
)
static

overloaded functions – return a const reference to a PeptideIdentification object or a peptideHit either from a consensusMap or a vector<PeptideIdentification>

◆ getPeptideIdentification() [2/2]

static const PeptideIdentification& getPeptideIdentification ( const std::vector< PeptideIdentification > &  peptide_nodes,
const PeptideEntry peptide 
)
static

◆ getResults()

const std::vector<ResolverResult>& getResults ( )

◆ includeMSMSPeptides_() [1/2]

Size includeMSMSPeptides_ ( ConsensusMap consensus,
std::vector< PeptideEntry > &  peptide_nodes 
)
private

TODO include run information for each peptide includes all MS/MS derived peptides into the graph –consensusXML

◆ includeMSMSPeptides_() [2/2]

Size includeMSMSPeptides_ ( std::vector< PeptideIdentification > &  peptide_identifications,
std::vector< PeptideEntry > &  peptide_nodes 
)
private

includes all MS/MS derived peptides into the graph –idXML

◆ operator=()

ProteinResolver& operator= ( const ProteinResolver rhs)

◆ primaryProteins_()

void primaryProteins_ ( std::vector< PeptideEntry > &  peptide_nodes,
std::vector< Size > &  reindexed_peptides 
)
private

marks Proteins which have a unique peptide as primary. Uses reindexed vector, thus reindexingNodes has to be called before.

◆ reindexingNodes_()

void reindexingNodes_ ( std::vector< MSDGroup > &  msd_groups,
std::vector< Size > &  reindexed_proteins,
std::vector< Size > &  reindexed_peptides 
)
private

Proteins and Peptides get reindexed, based on whether they belong to msd groups or not. Indexes of Proteins which are in an ISD group but in none of the MSD groups will not be used anymore.

◆ resolveConsensus()

void resolveConsensus ( ConsensusMap consensus)

Computing protein groups from peptide identifications OR consensus map.

Computes ISD and MSD groups.

Parameters
consensusConsensusMap in case consensusXML file is given as input

◆ resolveID()

void resolveID ( std::vector< PeptideIdentification > &  peptide_identifications)

Computing protein groups from peptide identifications OR consensus map.

Computes ISD and MSD groups.

Parameters
peptide_identificationsVector of PeptideIdentification in case idXML is given as input

◆ setProteinData()

void setProteinData ( std::vector< FASTAFile::FASTAEntry > &  protein_data)

◆ traversePeptide_()

void traversePeptide_ ( PeptideEntry pep_node,
MSDGroup group 
)
private

◆ traverseProtein_()

void traverseProtein_ ( ProteinEntry prot_node,
MSDGroup group 
)
private

traverse protein and peptide nodes for building MSD groups

Member Data Documentation

◆ protein_data_

std::vector<FASTAFile::FASTAEntry> protein_data_
private

◆ resolver_result_

std::vector<ResolverResult> resolver_result_
private