Class representing a single peptide fragment. More...
#include <ms_fragment.hpp>
Public Types | |
enum | LABEL_FORMAT { LABEL_FORMAT_TRADITIONAL = 0 , LABEL_FORMAT_PEPTIDE_VIEW = 1 } |
Format of fragment labels returned by getLabel(). More... | |
Public Member Functions | |
ms_fragment () | |
Default constructor (don't use it). | |
ms_fragment (const char *seriesName, const double massValue, const double nlValue, const int col, const int chargeState=1, const double matchedExptMass=0, const double matchedExptIntensity=0) | |
A constructor for regular series ions. | |
ms_fragment (const char residueName, const double massValue, const double nlValue, const int col=-1, const int chargeState=1, const double matchedExptMass=0, const double matchedExptIntensity=0) | |
A constructor for immonium ion. | |
ms_fragment (const double massValue, const double nlValue, const int chargeState, const double matchedExptMass=0, const double matchedExptIntensity=0) | |
A constructor for precursor neutral loss peak. | |
ms_fragment (const int seriesID, const double massValue, const double nlValue, const char *peptideStr, const int startPos, const int endPos, const int chargeState=1, const double matchedExptMass=0, const double matchedExptIntensity=0) | |
A constructor for internal series ions only. | |
ms_fragment (const int seriesID, const double massValue, const double nlValue, const int col, const int chargeState=1, const double matchedExptMass=0, const double matchedExptIntensity=0) | |
A constructor for regular series ions. | |
ms_fragment (const ms_fragment &src) | |
Copying constructor. | |
ms_fragment (const ms_peptide::PSM psmComponent, const char *seriesName, const double massValue, const double nlValue, const int col, const int chargeState, const double matchedExptMass=0, const double matchedExptIntensity=0) | |
A constructor for regular series ions of a crosslinked peptide. | |
ms_fragment (const ms_peptide::PSM psmComponent, const char residueName, const double massValue, const double nlValue, const int col, const int chargeState, const double matchedExptMass=0, const double matchedExptIntensity=0) | |
A constructor for immonium ion of a crosslinked peptide. | |
ms_fragment (const ms_peptide::PSM psmComponent, const int seriesID, const double massValue, const double nlValue, const char *peptideStr, const int startPos, const int endPos, const int chargeState, const double matchedExptMass=0, const double matchedExptIntensity=0) | |
A constructor for internal series ions of a crosslinked peptide. | |
ms_fragment (const ms_peptide::PSM psmComponent, const int seriesID, const double massValue, const double nlValue, const int col, const int chargeState, const double matchedExptMass=0, const double matchedExptIntensity=0) | |
A constructor for regular series ions of a crosslinked peptide. | |
void | clearMatchedIon () |
Sets the fragment to be 'unmatched'. | |
void | copyFrom (const ms_fragment *src) |
Copies the whole content of another instance. | |
int | getAllMatchedIons (std::vector< double > &masses, std::vector< double > &intensities) const |
Returns the list of all experimental data that matched the calculated fragment mass. | |
int | getCharge () const |
Returns the charge state (1, 2, 3 etc.) for the ion. | |
int | getColumn () const |
Returns the 1-based position index in case of a regular series. | |
int | getEnd () const |
Returns the 1-based last position in case of an internal fragment. | |
std::string | getLabel (const LABEL_FORMAT fmt=LABEL_FORMAT_TRADITIONAL) const |
Returns a symbolic label like "a*(6)++". | |
double | getMass () const |
Returns the ion mass (m/z) value. | |
double | getMatchedIonIntensity () const |
Returns the intensity of an experimental peak that matched the calculated mass value. | |
double | getMatchedIonMass () const |
Returns the m/z value of an experimental peak that matched the calculated mass value. | |
double | getNeutralLoss () const |
Returns the neutral loss (m/z) values applied to the fragment. | |
std::string | getPeptideSubstring () const |
Returns the peptide substring for internal fragments, residue name for immonium. | |
std::string | getSeriesName () const |
Returns the ion series name. | |
int | getStart () const |
Returns the 1-based start position within the peptide sequence. | |
bool | isCTerminal () const |
Returns TRUE for y, v, w, x, z series, and FALSE for other series, internal ions and immonium ions. | |
bool | isFromAlpha () const |
Returns TRUE if this fragment comes from the alpha peptide of a crosslinked match. | |
bool | isFromBeta () const |
Returns TRUE if this fragment comes from the beta peptide of a crosslinked match. | |
bool | isImmonium () const |
Returns TRUE for immonium ions. | |
bool | isInternal () const |
Returns TRUE for internal fragments ya and yb . | |
bool | isNTerminal () const |
Returns TRUE for a, b, c, d series, and FALSE for other series, internal ions and immonium ions. | |
bool | isPrecursorNL () const |
Returns TRUE for precursor neutral loss peaks. | |
bool | isRegular () const |
Returns TRUE for a, b, c, d, y, v, w, x, z series and their derivatives. | |
ms_fragment & | operator= (const ms_fragment &right) |
Assignment operator for C++ programs. | |
void | setMatchedIon (const double mass, const double intensity) |
Class representing a single peptide fragment.
enum LABEL_FORMAT |
Format of fragment labels returned by getLabel().
The traditional label format was introduced in Parser 2.2. It has three parts, in this order: fragment ID, charge state and neutral loss. NL is separated from charge state by a space. If NL is zero, there is no space. Fragment ID depends on the series:
Examples of labels in traditional format: "b(3)++ -64"
, "LVIK -16"
, "a(1)++"
, "y(15)"
The Peptide View label format was introduced in Mascot 2.1. The format contains the same three parts as the traditional format, but the order is different: fragment ID, neutral loss, charge state. There is no space between the elements. Peptide View format supports negative doubly charged ions.
Examples of labels in Peptide View format: "b(3)-64++"
, "LVIK-16"
, "a(1)++"
, "y(15)"
, "b(3)-64--"
Enumerator | |
---|---|
LABEL_FORMAT_TRADITIONAL | Format introduced in Parser 2.2. |
LABEL_FORMAT_PEPTIDE_VIEW | Format used by Peptide View since Mascot 2.1. |
ms_fragment | ( | ) |
Default constructor (don't use it).
Initialises all values to defaults.
ms_fragment | ( | const ms_fragment & | src | ) |
Copying constructor.
src | is the original fragment to base the new one on. |
ms_fragment | ( | const int | seriesID, |
const double | massValue, | ||
const double | nlValue, | ||
const int | col, | ||
const int | chargeState = 1 , |
||
const double | matchedExptMass = 0 , |
||
const double | matchedExptIntensity = 0 |
||
) |
A constructor for regular series ions.
seriesID | ion series number. It must be one of the values in matrix_science::ms_fragmentationrules::FRAG_SERIES_TYPE. |
massValue | ion mass value. |
nlValue | neutral loss value. |
col | position index for the ion. |
chargeState | charge state (1, 2, 3 etc.) of the ion. |
matchedExptMass | is the m/z value of an experimental peak that matches this calculated fragment ion. |
matchedExptIntensity | is the intensity of an experimental peak that matches this calculated fragment ion. |
ms_fragment | ( | const ms_peptide::PSM | psmComponent, |
const int | seriesID, | ||
const double | massValue, | ||
const double | nlValue, | ||
const int | col, | ||
const int | chargeState, | ||
const double | matchedExptMass = 0 , |
||
const double | matchedExptIntensity = 0 |
||
) |
A constructor for regular series ions of a crosslinked peptide.
psmComponent | One of the values for ms_peptide::PSM. If ms_peptide::PSM_COMPLETE, the object is the same as if it had been constructed with ms_fragment(const int, const double, const double, const int, const int, const double, const double). |
seriesID | ion series number. It must be one of the values in matrix_science::ms_fragmentationrules::FRAG_SERIES_TYPE. |
massValue | ion mass value. |
nlValue | neutral loss value. |
col | position index for the ion. |
chargeState | charge state (1, 2, 3 etc.) of the ion. |
matchedExptMass | is the m/z value of an experimental peak that matches this calculated fragment ion. |
matchedExptIntensity | is the intensity of an experimental peak that matches this calculated fragment ion. |
ms_fragment | ( | const char * | seriesName, |
const double | massValue, | ||
const double | nlValue, | ||
const int | col, | ||
const int | chargeState = 1 , |
||
const double | matchedExptMass = 0 , |
||
const double | matchedExptIntensity = 0 |
||
) |
A constructor for regular series ions.
seriesName | ion series name. |
massValue | ion mass value. |
nlValue | neutral loss value. |
col | position index for the ion. |
chargeState | charge state (1, 2, 3 etc.) of the ion. |
matchedExptMass | is the m/z value of an experimental peak that matches this calculated fragment ion. |
matchedExptIntensity | is the intensity of an experimental peak that matches this calculated fragment ion. |
ms_fragment | ( | const ms_peptide::PSM | psmComponent, |
const char * | seriesName, | ||
const double | massValue, | ||
const double | nlValue, | ||
const int | col, | ||
const int | chargeState, | ||
const double | matchedExptMass = 0 , |
||
const double | matchedExptIntensity = 0 |
||
) |
A constructor for regular series ions of a crosslinked peptide.
psmComponent | One of the values for ms_peptide::PSM. If ms_peptide::PSM_COMPLETE, the object is the same as if it had been constructed with ms_fragment(const char*, const double, const double, const int, const int, const double, const double). |
seriesName | ion series name. |
massValue | ion mass value. |
nlValue | neutral loss value. |
col | position index for the ion. |
chargeState | charge state (1, 2, 3 etc.) of the ion. |
matchedExptMass | is the m/z value of an experimental peak that matches this calculated fragment ion. |
matchedExptIntensity | is the intensity of an experimental peak that matches this calculated fragment ion. |
ms_fragment | ( | const int | seriesID, |
const double | massValue, | ||
const double | nlValue, | ||
const char * | peptideStr, | ||
const int | startPos, | ||
const int | endPos, | ||
const int | chargeState = 1 , |
||
const double | matchedExptMass = 0 , |
||
const double | matchedExptIntensity = 0 |
||
) |
A constructor for internal series ions only.
seriesID | ion series number. It must be one of the values in matrix_science::ms_fragmentationrules::FRAG_SERIES_TYPE. |
massValue | ion mass value. |
nlValue | neutral loss value. |
peptideStr | peptide sequence string. |
startPos | first position of the fragment. |
endPos | last position of the fragment. |
chargeState | for the internals ions series – should be 1 or 2. |
matchedExptMass | is the m/z value of an experimental peak that matches this calculated fragment ion. |
matchedExptIntensity | is the intensity of an experimental peak that matches this calculated fragment ion. |
ms_fragment | ( | const ms_peptide::PSM | psmComponent, |
const int | seriesID, | ||
const double | massValue, | ||
const double | nlValue, | ||
const char * | peptideStr, | ||
const int | startPos, | ||
const int | endPos, | ||
const int | chargeState, | ||
const double | matchedExptMass = 0 , |
||
const double | matchedExptIntensity = 0 |
||
) |
A constructor for internal series ions of a crosslinked peptide.
psmComponent | One of the values for ms_peptide::PSM. If ms_peptide::PSM_COMPLETE, the object is the same as if it had been constructed with ms_fragment(const int, const double, const double, const char*, const int, const int, const int, const double, const double). |
seriesID | ion series number. It must be one of the values in matrix_science::ms_fragmentationrules::FRAG_SERIES_TYPE. |
massValue | ion mass value. |
nlValue | neutral loss value. |
peptideStr | peptide sequence string. |
startPos | first position of the fragment. |
endPos | last position of the fragment. |
chargeState | for the internals ions series – should be 1 or 2. |
matchedExptMass | is the m/z value of an experimental peak that matches this calculated fragment ion. |
matchedExptIntensity | is the intensity of an experimental peak that matches this calculated fragment ion. |
ms_fragment | ( | const char | residueName, |
const double | massValue, | ||
const double | nlValue, | ||
const int | col = -1 , |
||
const int | chargeState = 1 , |
||
const double | matchedExptMass = 0 , |
||
const double | matchedExptIntensity = 0 |
||
) |
A constructor for immonium ion.
This constructor is only used for immonium ions.
residueName | amino-acid name. |
massValue | ion mass value. |
nlValue | neutral loss value. |
col | position index for the ion. |
chargeState | charge state (1, 2, 3 etc.) of the ion. |
matchedExptMass | is the m/z value of an experimental peak that matches this calculated fragment ion. |
matchedExptIntensity | is the intensity of an experimental peak that matches this calculated fragment ion. |
ms_fragment | ( | const ms_peptide::PSM | psmComponent, |
const char | residueName, | ||
const double | massValue, | ||
const double | nlValue, | ||
const int | col, | ||
const int | chargeState, | ||
const double | matchedExptMass = 0 , |
||
const double | matchedExptIntensity = 0 |
||
) |
A constructor for immonium ion of a crosslinked peptide.
This constructor is only used for immonium ions.
psmComponent | One of the values for ms_peptide::PSM. If ms_peptide::PSM_COMPLETE, the object is the same as if it had been constructed with ms_fragment(const char, const double, const double, const int, const int, const double, const double). |
residueName | amino-acid name. |
massValue | ion mass value. |
nlValue | neutral loss value. |
col | position index for the ion. |
chargeState | charge state (1, 2, 3 etc.) of the ion. |
matchedExptMass | is the m/z value of an experimental peak that matches this calculated fragment ion. |
matchedExptIntensity | is the intensity of an experimental peak that matches this calculated fragment ion. |
ms_fragment | ( | const double | massValue, |
const double | nlValue, | ||
const int | chargeState, | ||
const double | matchedExptMass = 0 , |
||
const double | matchedExptIntensity = 0 |
||
) |
A constructor for precursor neutral loss peak.
This constructor is only used for precursor neutral loss peaks. Normally massValue = (mrCalc - nlValue + protonMass * chargeState) / chargeState, where mrCalc is the relative precursor mass.
massValue | ion mass value. |
nlValue | neutral loss value. |
chargeState | charge state (1, 2, 3 etc.) of the ion. |
matchedExptMass | is the m/z value of an experimental peak that matches this calculated fragment ion. |
matchedExptIntensity | is the intensity of an experimental peak that matches this calculated fragment ion. |
void copyFrom | ( | const ms_fragment * | src | ) |
Copies the whole content of another instance.
Copy everything from src onto this fragment object.
src | valid pointer to a ms_fragment object |
int getAllMatchedIons | ( | std::vector< double > & | masses, |
std::vector< double > & | intensities | ||
) | const |
Returns the list of all experimental data that matched the calculated fragment mass.
See ms_fragmentvector::addExperimentalData().
masses | is used to return a vector of mass values. See Using STL vector classes vectori, vectord and VectorString in Perl, Java, Python and C#. |
intensities | is used to return a corresponding vector of intensity values. Using STL vector classes vectori, vectord and VectorString in Perl, Java, Python and C#. |
int getEnd | ( | ) | const |
Returns the 1-based last position in case of an internal fragment.
This will be -1 for a 'regular' series, immonium ions and precursor NL ions.
std::string getLabel | ( | const LABEL_FORMAT | fmt = LABEL_FORMAT_TRADITIONAL | ) | const |
Returns a symbolic label like "a*(6)++".
fmt | Output format of the label. Default is ms_fragment::LABEL_FORMAT_TRADITIONAL. |
double getMatchedIonIntensity | ( | ) | const |
Returns the intensity of an experimental peak that matched the calculated mass value.
See ms_fragmentvector::addExperimentalData().
double getMatchedIonMass | ( | ) | const |
Returns the m/z value of an experimental peak that matched the calculated mass value.
See ms_fragmentvector::addExperimentalData().
std::string getSeriesName | ( | ) | const |
Returns the ion series name.
The ions series name will be one of:
int getStart | ( | ) | const |
Returns the 1-based start position within the peptide sequence.
bool isFromAlpha | ( | ) | const |
Returns TRUE if this fragment comes from the alpha peptide of a crosslinked match.
bool isFromBeta | ( | ) | const |
Returns TRUE if this fragment comes from the beta peptide of a crosslinked match.
ms_fragment & operator= | ( | const ms_fragment & | right | ) |
Assignment operator for C++ programs.
right | is the original fragment to copy to the new one. |
void setMatchedIon | ( | const double | mass, |
const double | intensity | ||
) |
Sets the mass and intensity of experimental data that matched the calculated mass value.
See ms_fragmentvector::addExperimentalData().
These values will be zero if no peak matched.
mass | is the experimental m/z value that matched the peak. |
intensity | is the experimental intensity value that matched the peak. |