Matrix Science header
Public Types | Public Member Functions | Static Public Member Functions

ms_fragmentationrules Class Reference
[Mascot configuration files module]

This class encapsulates a single entry (an instrument) from a fragmentation_rules file. More...

#include <ms_fragmentationrules.hpp>

Inheritance diagram for ms_fragmentationrules:
Inheritance graph
[legend]
Collaboration diagram for ms_fragmentationrules:
Collaboration graph
[legend]

List of all members.

Public Types

enum  FRAG_SERIES_TYPE {
  FRAG_IMMONIUM = 4,
  FRAG_A_SERIES = 5,
  FRAG_A_MINUS_NH3 = 6,
  FRAG_A_MINUS_H2O = 7,
  FRAG_B_SERIES = 8,
  FRAG_B_MINUS_NH3 = 9,
  FRAG_B_MINUS_H2O = 10,
  FRAG_C_SERIES = 11,
  FRAG_X_SERIES = 12,
  FRAG_Y_SERIES = 13,
  FRAG_Y_MINUS_NH3 = 14,
  FRAG_Y_MINUS_H2O = 15,
  FRAG_Z_SERIES = 16,
  FRAG_INTERNAL_YB = 17,
  FRAG_INTERNAL_YA = 18,
  FRAG_Z_PLUS_1 = 21,
  FRAG_D_SERIES = 22,
  FRAG_V_SERIES = 23,
  FRAG_W_SERIES = 24,
  FRAG_Z_PLUS_2 = 25
}
 

Definitions for ID-constants for series used.

More...

Public Member Functions

 ms_fragmentationrules ()
 Default constructor is used to create an empty object.
 ms_fragmentationrules (const ms_fragmentationrules &src)
 Copying constructor.
 ~ms_fragmentationrules ()
 Destructor.
bool anyNLseriesUsed (const int series) const
 Will return true if any 'neutral loss' series is specified for this series.
void clearSeries ()
 Deletes all series usage information.
void copyFrom (const ms_fragmentationrules *right)
 Copies all information from another instance of the class.
void defaultValues ()
 Initialises the instance with default values.
double getMaxInternalMass () const
 Returns the maximum mass to be considered for internal fragments.
double getMinInternalMass () const
 Returns the minimum mass to be considered for internal fragments.
std::string getPreceedingComments () const
 Returns any comments preceeding the section.
std::string getTitle () const
 Returns the title of the instrument.
bool isCharged2Plus () const
 Returns true if the 'doubly charged 2+' fragmentation rule is specified.
bool isCharged3Plus () const
 Returns true if the 'doubly charged 3+' fragmentation rule is specified.
bool isSeriesUsed (const int series) const
 Returns true if a given series is specified for the instrument.
bool isSinglyCharged () const
 Returns true if the 'singly charged' fragmentation rule is specified.
bool isValid () const
 Use this method to do a basic check on a newly created object.
ms_fragmentationrulesoperator= (const ms_fragmentationrules &right)
 Assignment operator.
void setCharged2Plus (const bool value)
 Change the availability the of 'doubly charged 2+' fragmentation rule.
void setCharged3Plus (const bool value)
 Change the availability the of 'doubly charged 3+' fragmentation rule.
void setMaxInternalMass (const double mass)
 Sets the maximum mass to be considered for internal fragments.
void setMinInternalMass (const double mass)
 Set the minimum mass to be considered for internal fragments.
void setPreceedingComments (const std::string &comments)
 Sets any comments preceeding the section.
void setSeriesUsed (const int series, const bool val)
 Sets availability on a given series.
void setSinglyCharged (const bool value)
 Change the availability of the 'singly charged' fragmentation rule.
void setTitle (const char *title)
 Assigns a new title to the rule.
bool verifyRule (ms_errs *err_, const bool tryToFix)
 Tries to detect any inconsistencies in the instrument definition.

Static Public Member Functions

static int getFirstSerie ()
 The lowest series number that can be used.
static int getFirstSeries ()
 The lowest series number that can be used.
static int getLastSerie ()
 The highest series number that can be used.
static int getLastSeries ()
 The highest series number that can be used.
static std::string getSeriesDescription (const int series)
 Returns a description string for a given series.
static std::string getSeriesName (const int series)
 Returns a short series name.
static int getTotalSeriesOutput ()
 Returns the length of the series string output in a Mascot results file.
static bool isBackboneSeries (const int series)
 Returns true if the series is a 'backbone' fragment.
static bool isNeutralLossSeries (const int series)
 Returns true if the series is a 'neutral loss' series.

Detailed Description

This class encapsulates a single entry (an instrument) from a fragmentation_rules file.

Objects of this class are normally created by loading a file using the ms_fragrulesfile class.

Also get yourselves acquainted with the base class ms_customproperty. It facilitates the following tasks:

More functionality is described in the documentation for ms_customproperty.

Examples:

config_fragrules.cpp.


Member Enumeration Documentation

Definitions for ID-constants for series used.

See Using enumerated values in Perl, Java, Python and C#.

See http://www.matrixscience.com/help/fragmentation_help.html for details of ions types.

Enumerator:
FRAG_IMMONIUM 

Immonium ions.

FRAG_A_SERIES 

A series ions.

FRAG_A_MINUS_NH3 

Referred to as a* in Mascot reports.

FRAG_A_MINUS_H2O 

Referred to as ao in Mascot reports.

FRAG_B_SERIES 

B series ions.

FRAG_B_MINUS_NH3 

Referred to as b* in Mascot reports.

FRAG_B_MINUS_H2O 

Referred to as bo in Mascot reports.

FRAG_C_SERIES 

C series ions.

FRAG_X_SERIES 

X series ions.

FRAG_Y_SERIES 

Y series ions.

FRAG_Y_MINUS_NH3 

Referred to as y* in Mascot reports.

FRAG_Y_MINUS_H2O 

Referred to as yo in Mascot reports.

FRAG_Z_SERIES 

Z series ions.

FRAG_INTERNAL_YB 

Internal series, caused by double backbone cleavage. Combination of b type and y type cleavage.

FRAG_INTERNAL_YA 

Internal series, caused by double backbone cleavage. Combination of a type and y type cleavage.

FRAG_Z_PLUS_1 

Z+1 series.

FRAG_D_SERIES 

D Satellite Ions. A series partial side chain. Collision induced dissociation of ions at keV energies.

FRAG_V_SERIES 

V Satellite Ions. Y series partial side chain. Collision induced dissociation of ions at keV energies.

FRAG_W_SERIES 

W Satellite Ions. Z series partial side chain. Collision induced dissociation of ions at keV energies.

FRAG_Z_PLUS_2 

Z+2 series.


Constructor & Destructor Documentation

Default constructor is used to create an empty object.

Use member functions to fill up the list of allowed series.

Destructor.

Frees all memory allocated for the object.


Member Function Documentation

bool anyNLseriesUsed ( const int  series ) const

Will return true if any 'neutral loss' series is specified for this series.

Parameters:
seriesmust be a number between getFirstSeries() and getLastSeries() inclusive.
Returns:
true if the passed series
  • is A and A with loss of water or NH3 is also specified, or
  • is B and B with loss of water or NH3 is also specified, or
  • is Y and Y with loss of water or NH3 is also specified.
Otherwise returns false.
void clearSeries (  )

Deletes all series usage information.

All series are set to be unused, but the instrument title is retained.

void copyFrom ( const ms_fragmentationrules right )

Copies all information from another instance of the class.

Parameters:
rightis the fragmentation rules to copy from.
void defaultValues (  )

Initialises the instance with default values.

Sets all series to be unused.

Reimplemented from ms_customproperty.

int getFirstSerie (  ) [static]

The lowest series number that can be used.

Deprecated:
Use getFirstSeries().
Returns:
The first usable series number. Series numbers '1', '2' and '3' relate to allowed charge states rather than real series.
int getFirstSeries (  ) [static]

The lowest series number that can be used.

See also:
ms_fragmentationrules::getLastSeries()
Returns:
The first usable series number. Series numbers '1', '2' and '3' relate to allowed charge states rather than real series.
int getLastSerie (  ) [static]

The highest series number that can be used.

Deprecated:
Use getLastSeries().
Returns:
The last usable series number. More series may be added in later versions of Mascot, and using this function may allow code to be made 'future proof'.
int getLastSeries (  ) [static]

The highest series number that can be used.

See also:
ms_fragmentationrules::getFirstSeries()
Returns:
The last usable series number. More series may be added in later versions of Mascot, and using this function may allow code to be made 'future proof'.
double getMaxInternalMass (  ) const

Returns the maximum mass to be considered for internal fragments.

Introduced in Mascot 2.2, the values for minimum and maximum internal masses are specified in the fragmentation_rules file as

   minInternalMass 0.0
   maxInternalMass 700.0 

These are the masses used for the FRAG_INTERNAL_YB and FRAG_INTERNAL_YA series.

Returns:
The maximum internal mass to be considered for this instrument.
double getMinInternalMass (  ) const

Returns the minimum mass to be considered for internal fragments.

Introduced in Mascot 2.2, the values for minimum and maximum internal masses are specified in the fragmentation_rules file as

   minInternalMass 0.0
   maxInternalMass 700.0 

These are the masses used for the FRAG_INTERNAL_YB and FRAG_INTERNAL_YA series.

Returns:
The minimum internal mass to be considered for this instrument.
std::string getPreceedingComments (  ) const [inherited]

Returns any comments preceeding the section.

Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.

Multiple line comments are supported by having a single string with newline characters

See also:
setPreceedingComments()
Returns:
any comments preceeding the section
std::string getSeriesDescription ( const int  series ) [static]

Returns a description string for a given series.

Parameters:
seriesmust be a number between getFirstSeries() and getLastSeries() inclusive.
Returns:
series description
std::string getSeriesName ( const int  series ) [static]

Returns a short series name.

Parameters:
seriesmust be a number between getFirstSeries() and getLastSeries() inclusive.
Returns:
series name
std::string getTitle (  ) const

Returns the title of the instrument.

This is obtained from the

title: 

line in the fragmentation_rules file.

Returns:
The title.
int getTotalSeriesOutput (  ) [static]

Returns the length of the series string output in a Mascot results file.

See also:
ms_peptide::getVarModsStr()
Returns:
the number of series that output for each peptide in the Mascot results file.
bool isBackboneSeries ( const int  series ) [static]

Returns true if the series is a 'backbone' fragment.

Parameters:
seriesmust be a number between getFirstSeries() and getLastSeries() inclusive.
Returns:
true if the series is A, B, Y, C, X, Z, Z+1, Z+2 or loss of water or NH3 from A,B or Y.
bool isCharged2Plus (  ) const

Returns true if the 'doubly charged 2+' fragmentation rule is specified.

Returns:
true if rule 2, doubly charged if precursor 2+ or higher is specified and therefore 2+ ions, for the specified series (not internal or immonium) are to be considered.
bool isCharged3Plus (  ) const

Returns true if the 'doubly charged 3+' fragmentation rule is specified.

Returns:
true if rule 3, doubly charged if precursor 3+ or higher is specified and therefore 2+ ions, for the specified series (not internal or immonium) are to be considered.
bool isNeutralLossSeries ( const int  series ) [static]

Returns true if the series is a 'neutral loss' series.

Parameters:
seriesmust be a number between getFirstSeries() and getLastSeries() inclusive.
Returns:
true if the series is loss of water or NH3 from A,B or Y.
bool isSeriesUsed ( const int  series ) const

Returns true if a given series is specified for the instrument.

Currently supported series are (FRAG_SERIES_TYPE):

  • 4 - immonium ions
  • 5 - 'a' ions
  • 6 - 'a-NH3' or 'a*' ions
  • 7 - 'a-H2O' or 'a0' ions
  • 8 - 'b' ions
  • 9 - 'b-NH3' or 'b*' ions
  • 10 - 'b-H2O' or 'b0' ions
  • 11 - 'c' ions
  • 12 - 'x' ions
  • 13 - 'y' ions
  • 14 - 'y-NH3' or 'y*' ions
  • 15 - 'y-H2O' or 'y0' ions
  • 16 - 'z' ions
  • 17 - internal fragments 'yb'
  • 18 - internal fragments 'ya'
  • 21 - 'z+1' ions
  • 22 - high-energy 'd' ions
  • 23 - high-energy 'v' ions
  • 24 - high-energy 'w' ions
  • 25 - 'z+2' ions

In addition, two more rules may be specified:

  • 19 - 'y' or 'y++' series presense must be significant
  • 20 - 'y' or 'y++' must be highest scoring series
Parameters:
seriesmust be a number between getFirstSeries() and getLastSeries() inclusive.
Returns:
true if the series if used, false otherwise
bool isSinglyCharged (  ) const

Returns true if the 'singly charged' fragmentation rule is specified.

Returns:
true if rule 1 singly charged ions is specified and therefore 1+ ions, for the specified series are to be considered.
bool isValid (  ) const

Use this method to do a basic check on a newly created object.

The verifyRule() function will generally be more useful.

Returns:
true if the series and masses are consistent, false otherwise
ms_fragmentationrules & operator= ( const ms_fragmentationrules right )

Assignment operator.

Parameters:
rightis the fragmentation rules to copy from.
Returns:
reference to the current object
void setCharged2Plus ( const bool  value )

Change the availability the of 'doubly charged 2+' fragmentation rule.

Parameters:
valueshould be set to true if rule 2, doubly charged if precursor 2+ or higher is to be specified and therefore 2+ ions, for the specified series (not internal or immonium) are to be considered.
void setCharged3Plus ( const bool  value )

Change the availability the of 'doubly charged 3+' fragmentation rule.

Parameters:
valueshould be set to true if rule 3, doubly charged if precursor 3+ or higher is to be specified and therefore 2+ ions, for the specified series (not internal or immonium) are to be considered.
void setMaxInternalMass ( const double  mass )

Sets the maximum mass to be considered for internal fragments.

Introduced in Mascot 2.2, the values for minimum and maximum internal masses are specified in the fragmentation_rules file as

   minInternalMass 0.0
   maxInternalMass 700.0 

These are the masses used for the FRAG_INTERNAL_YB and FRAG_INTERNAL_YA series.

Parameters:
massThe new maximum internal mass to be considered for this instrument.
void setMinInternalMass ( const double  mass )

Set the minimum mass to be considered for internal fragments.

Introduced in Mascot 2.2, the values for minimum and maximum internal masses are specified in the fragmentation_rules file as

   minInternalMass 0.0
   maxInternalMass 700.0 

These are the masses used for the FRAG_INTERNAL_YB and FRAG_INTERNAL_YA series.

Parameters:
massThe new minimum internal mass to be considered for this instrument.
void setPreceedingComments ( const std::string &  comments ) [inherited]

Sets any comments preceeding the section.

Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.

Multiple line comments are supported by having a single string with newline characters

See also:
getPreceedingComments()
Parameters:
commentsany comments preceeding the section
void setSeriesUsed ( const int  series,
const bool  val 
)

Sets availability on a given series.

See isSeriesUsed() for a list of available series.

Parameters:
seriesmust be a number between getFirstSeries() and getLastSeries() inclusive.
valis a boolean value to specify whether the series should be considered.
Examples:
config_fragrules.cpp.
void setSinglyCharged ( const bool  value )

Change the availability of the 'singly charged' fragmentation rule.

Parameters:
valueshould be set to true if rule 1 (singly charged ions) are to be considered.
void setTitle ( const char *  title )

Assigns a new title to the rule.

Parameters:
titleis the new title.
bool verifyRule ( ms_errs errObj,
const bool  tryToFix 
)

Tries to detect any inconsistencies in the instrument definition.

This method tries to detect any inconsistencies and to fix some of them.

When tryToFix is set to true will force the method to try and fix the instrument definition and return a success code. In this case, error descriptions for the problems detected (and fixed) will be accumulated in errObj.

For example, if the FRAG_A_MINUS_NH3 series is specified, and FRAG_A_SERIES isn't specified, then, if tryToFix is specified, FRAG_A_SERIES will be added, and the ms_errs::ERR_MSP_FRAGMENTATION_RULES error will be added to the errObj list.

Parameters:
errObjerror-object to store error messages.
tryToFixif true, try to fix any problems encountered.
Returns:
always true, errors are set if something is wrong

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