Matrix Science header
Public Member Functions

ms_fragment Class Reference
[Classes for calculating masses of peptides and fragments.]

Class representing a single peptide fragment. More...

#include <ms_fragment.hpp>

List of all members.

Public Member Functions

 ms_fragment ()
 Default constructor (don't use it).
 ms_fragment (const ms_fragment &src)
 Copying constructor.
 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 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 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 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.
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
 Returns a symbolic label for the 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 in case of an internal fragment, which will also be valid for a 'regular' series.
bool isCTerminal () const
 Returns TRUE for y, v, w, x, z series, and FALSE for other series, internal ions and immonium ions.
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 isRegular () const
 Returns TRUE for a, b, c, d, y, v, w, x, z series and their derivatives.
ms_fragmentoperator= (const ms_fragment &right)
 Assignment operator for C++ programs.
void setMatchedIon (const double mass, const double intensity)

Detailed Description

Class representing a single peptide fragment.

Examples:

tools_aahelper.cpp.


Constructor & Destructor Documentation

ms_fragment (  )

Default constructor (don't use it).

Initialises all values to defaults.

ms_fragment ( const ms_fragment src )

Copying constructor.

Note:
This constructor can only be used from C++. Use copyFrom() from other programming languages.
Parameters:
srcis 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.

Parameters:
seriesIDion series number. It must be one of the values in matrix_science::ms_fragmentationrules::FRAG_SERIES_TYPE.
massValueion mass value.
nlValueneutral loss value.
colposition index for the ion.
chargeStatecharge state (1, 2, 3 etc.) of the ion.
matchedExptMassis the m/z value of an experimental peak that matches this calculated fragment ion.
matchedExptIntensityis 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.

Parameters:
seriesNameion series name.
massValueion mass value.
nlValueneutral loss value.
colposition index for the ion.
chargeStatecharge state (1, 2, 3 etc.) of the ion.
matchedExptMassis the m/z value of an experimental peak that matches this calculated fragment ion.
matchedExptIntensityis 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.

Parameters:
seriesIDion series number. It must be one of the values in matrix_science::ms_fragmentationrules::FRAG_SERIES_TYPE.
massValueion mass value.
nlValueneutral loss value.
peptideStrpeptide sequence string.
startPosfirst position of the fragment.
endPoslast position of the fragment.
chargeStatefor the internals ions series -- should be 1 or 2.
matchedExptMassis the m/z value of an experimental peak that matches this calculated fragment ion.
matchedExptIntensityis 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.

Parameters:
residueNameamino-acid name.
massValueion mass value.
nlValueneutral loss value.
colposition index for the ion.
chargeStatecharge state (1, 2, 3 etc.) of the ion.
matchedExptMassis the m/z value of an experimental peak that matches this calculated fragment ion.
matchedExptIntensityis the intensity of an experimental peak that matches this calculated fragment ion.

Member Function Documentation

void copyFrom ( const ms_fragment src )

Copies the whole content of another instance.

Copy everything from src onto this fragment object.

Parameters:
srcvalid 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().

Parameters:
massesis used to return a vector of mass values. See Using STL classes in Perl, Java, Python and C#.
intensitiesis used to return a corresponding vector of intensity values. Using STL classes in Perl, Java, Python and C#.
Returns:
the number of mass/intensity values returned.
int getEnd (  ) const

Returns the 1-based last position in case of an internal fragment.

This will be -1 for a 'regular' series.

Returns:
end of the series
Examples:
tools_aahelper.cpp.
double getMatchedIonIntensity (  ) const

Returns the intensity of an experimental peak that matched the calculated mass value.

See ms_fragmentvector::addExperimentalData().

Returns:
the intensity of the most intense experimental m/z value that matched the peak. This value will be zero if no peak matched.
double getMatchedIonMass (  ) const

Returns the m/z value of an experimental peak that matched the calculated mass value.

See ms_fragmentvector::addExperimentalData().

Returns:
the mass of the most intense experimental m/z value that matched the peak. This value will be zero if no peak matched.
std::string getSeriesName (  ) const

Returns the ion series name.

The ions series name will be one of:

  • a
  • a*
  • a0
  • b
  • b*
  • b0
  • c
  • x
  • y
  • y*
  • y0
  • z
  • z+1
  • d
  • v
  • w
  • z+2
  • ya
  • yb
  • immonium
Returns:
name of the series
Examples:
tools_aahelper.cpp.
ms_fragment & operator= ( const ms_fragment right )

Assignment operator for C++ programs.

Parameters:
rightis the original fragment to copy to the new one.
Returns:
reference to the current object
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.

Parameters:
massis the experimental m/z value that matched the peak.
intensityis the experimental intensity value that matched the peak.

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:52