Feature key identifying a peptide ratio. More...
#include <ms_peptide_quant_key.hpp>
Public Member Functions | |
ms_peptide_quant_key () | |
Create a nil peptide quant key. | |
ms_peptide_quant_key (const ms_peptide_quant_key &src) | |
Copying constructor. | |
ms_peptide_quant_key (const std::string &opaqueString) | |
Create a peptide quant key corresponding to an opaque string. | |
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 (int ID) | |
Create a peptide quant key corresponding to an integer ID. | |
ms_peptide_quant_key (int q, int p) | |
Create a peptide quant key corresponding to a peptide match. | |
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 () | |
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_key & | operator= (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. | |
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);
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.
q | Peptide query. |
p | Peptide 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.
q | Peptide query. |
p | Peptide rank. |
charge | Charge state. |
|
explicit |
Create a peptide quant key corresponding to an integer ID.
Use case: each peptide ratio has a unique integer ID.
ID | The peptide ratio ID. |
|
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.
opaqueString | The peptide ratio 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.
opaqueString | with 'user defined' meaning. |
ID | is a user defined integer. |
bool getCharge | ( | int & | charge | ) | const |
Return the charge of the peptide associated with this peptide quant key, if available.
See Multiple return values in Perl, Java, Python and C#.
Charge is only available if the peptide quant key was constructed with the query, rank and charge constructor.
[out] | charge | Charge state. |
bool getID | ( | int & | ID | ) | const |
Return the integer ID of this peptide quant key, if available.
See Multiple return values in Perl, Java, Python and C#.
Integer ID is only available if the peptide quant key was constructed with the integer ID constructor.
[out] | ID | Integer ID of the peptide quant key. |
bool getOpaqueString | ( | std::string & | opaqueStringRef | ) | const |
Return the opaque string of this peptide quant key, if available.
See Multiple return values in Perl, Java, Python and C#.
String ID is only available if the peptide quant key was constructed with the string ID constructor.
[out] | opaqueStringRef | The opaque string on which the feature ID is based. When calling from Java, use a StringBuffer for this parameter. |
bool getOpaqueStringAndID | ( | std::string & | opaqueStringRef, |
int & | ID | ||
) | const |
Return the opaque string of this peptide quant key, if available.
See Multiple return values in Perl, Java, Python and C#.
opaqueString and ID are only available if the peptide quant key was constructed with a constructor specifying the opaqueString and/or integer ID.
[out] | opaqueStringRef | The opaque string on which the feature ID is based. When calling from Java, use a StringBuffer for this parameter. |
[out] | ID | is the integer ID on which the feature ID is based. |
bool getQueryAndRank | ( | int & | q, |
int & | p | ||
) | const |
Return the query number and rank of the peptide associated with this peptide quant key, if available.
See Multiple return values in Perl, Java, Python and C#.
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.
[out] | q | Query number of the peptide quant key. |
[out] | p | Rank of the peptide quant key. |