Matrix Science header
Public Member Functions

ms_peptide_quant_key Class Reference
[Quantitation analysis for Mascot Server and Distiller]

Feature key identifying a peptide ratio. More...

#include <ms_peptide_quant_key.hpp>

List of all members.

Public Member Functions

 ms_peptide_quant_key ()
 Create a nil peptide quant key.
 ms_peptide_quant_key (int q, int p)
 Create a peptide quant key corresponding to a peptide match.
 ms_peptide_quant_key (int ID)
 Create a peptide quant key corresponding to an integer ID.
 ms_peptide_quant_key (const std::string &opaqueString)
 Create a peptide quant key corresponding to an opaque string.
 ms_peptide_quant_key (int q, int p, int charge)
 Create a peptide quant key corresponding to a peptide match with a specified charge state.
 ms_peptide_quant_key (const std::string &opaqueString, int ID)
 Create a peptide quant key corresponding to an opaque string and an integer ID.
 ms_peptide_quant_key (const ms_peptide_quant_key &src)
 Copying constructor.
 ~ms_peptide_quant_key ()
 Destructor.
bool getCharge (int &charge) const
 Return the charge of the peptide associated with this peptide quant key, if available.
bool getID (int &ID) const
 Return the integer ID of this peptide quant key, if available.
bool getOpaqueString (std::string &opaqueStringRef) const
 Return the opaque string of this peptide quant key, if available.
bool getOpaqueStringAndID (std::string &opaqueStringRef, int &ID) const
 Return the opaque string of this peptide quant key, if available.
bool getQueryAndRank (int &q, int &p) const
 Return the query number and rank of the peptide associated with this peptide quant key, if available.
bool isNil () const
 Return true if the peptide key is the nil key.
bool operator!= (const ms_peptide_quant_key &right) const
 C++ inequality.
bool operator< (const ms_peptide_quant_key &right) const
 C++ strict weak ordering.
bool operator<= (const ms_peptide_quant_key &right) const
 C++ strict weak ordering.
ms_peptide_quant_keyoperator= (const ms_peptide_quant_key &right)
 C++ assignment operator.
bool operator== (const ms_peptide_quant_key &right) const
 C++ equality.
bool operator> (const ms_peptide_quant_key &right) const
 C++ strict weak ordering.
bool operator>= (const ms_peptide_quant_key &right) const
 C++ strict weak ordering.

Detailed Description

Feature key identifying a peptide ratio.

A peptide ratio is a ratio of component intensities. The components can be reporter ions, XICs from different runs, or something else depending on quantitation protocol. In each case, the peptide ratio is identified by a particular set of features, which are encapsulated in its peptide quant key.

Sometimes there is a one-to-one mapping between identified peptides and peptide ratios, such as in the Multiplex protocol (e.g. SILAC), or between input spectra and peptide ratios, such as the Reporter protocol (e.g. iTRAQ). In this case the peptide quant key can be the query number and peptide rank (ms_peptide_quant_key(int q, int p)).

In the general case, the peptide quant key can be a free-form string (ms_peptide_quant_key(const std::string &opaqueKey)) or any integer ID (ms_peptide_quant_key(int ID)). The string is not interpreted by the constructor; in other words it is considered opaque.

C++ only: The class specifies a full strict weak ordering, which means ms_peptide_quant_key objects can be used as STL map and set keys.

Perl and Python only: Ensure all parameters passed to the constructor are cast to the right type. Both Perl and Python tend to convert variables internally to strings, and even if the string value looks like a number, it may not be converted to an integer when the constructor is called. This is because the constructors differ only by type, and the string version tends to be chosen by default. For example, the Perl code

     my $key = msparser::ms_peptide_quant_key->new($q, $p);
     

can choose either ms_peptide_quant_key(int, int) or ms_peptide_quant_key(const std::string &, int), depending on whether $q has ever been used in string context. To use the correct q,p form, cast both arguments to integers:

     my $key = msparser::ms_peptide_quant_key->new(0+$q, 0+$p);
     

Constructor & Destructor Documentation

Create a nil peptide quant key.

The nil peptide quant key is equivalent to the zero value. All other peptide quant keys are "larger" than the nil key.

ms_peptide_quant_key ( int  q,
int  p 
)

Create a peptide quant key corresponding to a peptide match.

Use case: the peptide ratio is derived from a single peptide match, such as in Multiplex (e.g. SILAC) and Reporter (e.g. iTRAQ). The query and rank refer to the query and rank in a Mascot results file.

Parameters:
qPeptide query.
pPeptide rank.
ms_peptide_quant_key ( int  q,
int  p,
int  charge 
)

Create a peptide quant key corresponding to a peptide match with a specified charge state.

Use case: the peptide ratio is linked to an identified peptide and a particular charge state.

Parameters:
qPeptide query.
pPeptide rank.
chargeCharge state.
ms_peptide_quant_key ( int  ID ) [explicit]

Create a peptide quant key corresponding to an integer ID.

Use case: each peptide ratio has a unique integer ID.

Parameters:
IDThe peptide ratio ID.
ms_peptide_quant_key ( const std::string &  opaqueString ) [explicit]

Create a peptide quant key corresponding to an opaque string.

Use case: each peptide ratio has a unique string ID.

The string ID is opaque in the sense that this class will not try to parse it. This means that even if the string ID encoded query, rank or charge, the corresponding accessor methods will not return parsed values.

Parameters:
opaqueStringThe peptide ratio ID.
ms_peptide_quant_key ( const std::string &  opaqueString,
int  ID 
) [explicit]

Create a peptide quant key corresponding to an opaque string and an integer ID.

Use case: each peptide ratio has a unique string and interger ID pair. This could be used for example when combining multiple Distiller XML files where the opaqueString might be the name of the Fxxxxx.dat file and the ID is the would be the id attribute value in the peptideMatch element. The combination of the two values will therefore be unique.

The string opaqueString is opaque in the sense that this class will not try to parse it.

Parameters:
opaqueStringwith 'user defined' meaning.
IDis a user defined integer.

Member Function Documentation

bool getCharge ( int &  charge ) const

Return the charge of the peptide associated with this peptide quant key, if available.

Charge is only available if the peptide quant key was constructed with the query, rank and charge constructor.

Parameters:
[out]chargeCharge state.
Returns:
True if the peptide quant key is based on query, rank and charge; false otherwise. If this method returns false, then charge is set to -1.
bool getID ( int &  ID ) const

Return the integer ID of this peptide quant key, if available.

Integer ID is only available if the peptide quant key was constructed with the integer ID constructor.

Parameters:
[out]IDInteger ID of the peptide quant key.
Returns:
True if the peptide quant key is based on integer IDs; false otherwise. If this method returns false, then ID is set to -1.
bool getOpaqueString ( std::string &  opaqueStringRef ) const

Return the opaque string of this peptide quant key, if available.

String ID is only available if the peptide quant key was constructed with the string ID constructor.

See Multiple return values in Perl, Java, Python and C#.

Parameters:
[out]opaqueStringRefThe opaque string on which the feature ID is based. When calling from Java, use a StringBuffer for this parameter.
Returns:
True if the peptide quant key is based on an opaque string; false otherwise. If this method returns false, opaqueStringRef is set to the empty string.
bool getOpaqueStringAndID ( std::string &  opaqueStringRef,
int &  ID 
) const

Return the opaque string of this peptide quant key, if available.

opaqueString and ID are only available if the peptide quant key was constructed with a constructor specifying the opaqueString and/or integer ID.

See Multiple return values in Perl, Java, Python and C#.

Parameters:
[out]opaqueStringRefThe opaque string on which the feature ID is based. When calling from Java, use a StringBuffer for this parameter.
[out]IDis the integer ID on which the feature ID is based.
Returns:
True if the peptide quant key is based on an opaque string and/or an integer ID; false otherwise. If this method returns false, opaqueStringRef is set to the empty string and ID is set to -1.
bool getQueryAndRank ( int &  q,
int &  p 
) const

Return the query number and rank of the peptide associated with this peptide quant key, if available.

Query and rank are only available if the peptide quant key was constructed with the query and rank constructor, or the query, rank and charge constructor.

Parameters:
[out]qQuery number of the peptide quant key.
[out]pRank of the peptide quant key.
Returns:
True if the peptide quant key is based on query and rank; false otherwise. If this method returns false, both q and p are set to -1.

The documentation for this class was generated from the following files:
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:53