Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_fragmentationrules Class Reference

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

#include <ms_fragmentationrules.hpp>

Inheritance diagram for ms_fragmentationrules:
Collaboration diagram for ms_fragmentationrules:

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 appendProperty (const char *name, const char *value, const char *delimiter, const bool bFirstPlace=false)
 Adds a new property with the given parameters.
 
void appendText (const char *line, const bool bFirstPlace=false)
 Adds a new non-parsed property.
 
void clearSeries ()
 Deletes all series usage information.
 
void copyFrom (const ms_customproperty *src)
 Copies all properties and comments from another instance.
 
void copyFrom (const ms_fragmentationrules *right)
 Copies all information from another instance of the class.
 
void defaultValues ()
 Initialises the instance with default values.
 
void delNonEmpty ()
 Deletes all non-comment properties.
 
void delProp (const char *name)
 Deletes all properties with the specified name.
 
void delPropByNumber (const int index)
 Deletes a single property with the specified number only.
 
void delPropStart (const char *nameBeginning)
 Deletes all properties whose names start with the given string.
 
int findProperty (const char *name, const int startFrom=0) const
 Searches the list for a property with the given name.
 
int findPropertyBeginning (const char *nameBeginning, const int startFrom=0) const
 Searches the list for a property with the partially matching name.
 
std::string getDefaultDelimiter () const
 Return current default delimiter string used for parsing/storing properties.
 
std::string getDelimiterByNumber (const int index) const
 Returns a specific delimiter used for the property.
 
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.
 
int getNumberOfProperties () const
 Returns a total number of property/comment entries.
 
std::string getPreceedingComments () const
 Returns any comments preceeding the section.
 
std::string getPropertyName (const int index) const
 Returns a property name for a given index.
 
std::string getPropValStringByName (const char *name) const
 Retrieves property value by name.
 
std::string getPropValStringByNumber (const int index) const
 Retrieves property raw text values by number.
 
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 setDefaultDelimiter (const char *delim)
 Allows to set a specific delimiter string to be used when no property-specific delimiter is supplied.
 
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 setPropertyName (const int index, const char *name)
 Changes name of the property with the given index.
 
void setPropValBoolByName (const char *name, const bool value, const bool bFirstPlace=false)
 Changes a boolean value of the first entry with the given name or creates a new property if it is not found.
 
void setPropValCharByName (const char *name, const char value, const bool bFirstPlace=false)
 Changes a single character value of the first entry with the given name or creates a new property if it is not found.
 
void setPropValFloatByName (const char *name, const double value, const bool bFirstPlace=false)
 Changes an floating point value of the first entry with the given name or creates a new property if it is not found.
 
void setPropValInt64ByName (const char *name, const INT64 value, const bool bFirstPlace=false)
 Changes a long 64-bit integer value of the first entry with the given name or creates a new property if it is not found.
 
void setPropValIntByName (const char *name, const int value, const bool bFirstPlace=false)
 Changes an integer value of the first entry with the given name or creates a new property if it is not found.
 
void setPropValStringByName (const char *name, const char *value, const bool bFirstPlace=false)
 Changes a string value of the first entry with the given name or creates a new property if it is not found.
 
void setPropValStringByNumber (const int index, const char *value)
 Changes an string value of an existing property with the given index.
 
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 uncommentProp (const int index, const char *delimeter=0)
 Uncomments a line in the configuration file.
 
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:

  • Retrieving an unsupported property.
  • Retrieving a raw/text/XML property representation.
  • Checking for existence of a certain property rather than dealing with its default value.
  • Accessing commented lines in a section.

More functionality is described in the documentation for ms_customproperty.

Examples
config_fragrules.cpp.

Member Enumeration Documentation

◆ FRAG_SERIES_TYPE

Definitions for ID-constants for series used.

See Using enumerated values and static const ints 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

◆ ms_fragmentationrules()

Default constructor is used to create an empty object.

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

◆ ~ms_fragmentationrules()

Destructor.

Frees all memory allocated for the object.

Member Function Documentation

◆ anyNLseriesUsed()

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.

◆ appendProperty()

void appendProperty ( const char *  name,
const char *  value,
const char *  delimiter,
const bool  bFirstPlace = false 
)
inherited

Adds a new property with the given parameters.

Parameters
namea property name to use.
valuea property value to use.
delimitera specific delimiter or an empty string for a default one to be used.
bFirstPlaceforces a new property to be put on top of the list.

◆ appendText()

void appendText ( const char *  l,
const bool  bFirstPlace = false 
)
inherited

Adds a new non-parsed property.

All property elements will be retrieved from the first parameter. Before calling this method, a specific default delimiter can be set using setDefaultDelimiter().

Parameters
lraw text representation of the property to be parsed.
bFirstPlaceforces a new property to be put on top of the list.

◆ clearSeries()

void clearSeries ( )

Deletes all series usage information.

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

◆ copyFrom()

void copyFrom ( const ms_fragmentationrules right)

Copies all information from another instance of the class.

Parameters
rightis the fragmentation rules to copy from.

◆ defaultValues()

void defaultValues ( )

Initialises the instance with default values.

Sets all series to be unused.

◆ delProp()

void delProp ( const char *  str)
inherited

Deletes all properties with the specified name.

Parameters
strProperty name to find a match and then delete.

◆ delPropStart()

void delPropStart ( const char *  str)
inherited

Deletes all properties whose names start with the given string.

Parameters
strBeginning a first part of the property name to delete.

◆ findProperty()

int findProperty ( const char *  name,
const int  startFrom = 0 
) const
inherited

Searches the list for a property with the given name.

If no property found with the given name -1 will be returned. There may be several property entries in the list with the same name.

Parameters
namea property name to be found.
startFroma minimal property index to start search from.
Returns
a property index or -1 if no property found.

◆ findPropertyBeginning()

int findPropertyBeginning ( const char *  nameBeginning,
const int  startFrom = 0 
) const
inherited

Searches the list for a property with the partially matching name.

If no property found with the given name part -1 will be returned. There may be several property entries in the list whose names start with the given string.

Parameters
nameBeginningfirst part of a property name to be found.
startFroma minimal property index to start search from.
Returns
a property index or -1 if no property found.

◆ getDefaultDelimiter()

std::string getDefaultDelimiter ( ) const
inherited

Return current default delimiter string used for parsing/storing properties.

Returns
default delimiter

◆ getDelimiterByNumber()

std::string getDelimiterByNumber ( const int  index) const
inherited

Returns a specific delimiter used for the property.

Parameters
indexIndex for which to get a delimiter
Returns
corresponding delimiter

◆ getFirstSerie()

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.

◆ getFirstSeries()

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.

◆ getLastSerie()

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'.

◆ getLastSeries()

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'.

◆ getMaxInternalMass()

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.

◆ getMinInternalMass()

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.

◆ getNumberOfProperties()

int getNumberOfProperties ( ) const
inherited

Returns a total number of property/comment entries.

Returns
Number of property/comment entries

◆ getPreceedingComments()

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

◆ getPropertyName()

std::string getPropertyName ( const int  index) const
inherited

Returns a property name for a given index.

Parameters
indexproperty number from 0 to (getNumberOfProperties()-1).
Returns
Rroperty name of an empty string for comments.

◆ getPropValStringByName()

std::string getPropValStringByName ( const char *  name) const
inherited

Retrieves property value by name.

Don't use this method for comments as they all have empty name. Also note that there might be several entries corresponding to the same name . – only the first value will be returned. If in doubt use findProperty() and getPropValStringByNumber() instead.

Parameters
nameName for which to get a property value
Returns
corresponding property value

◆ getPropValStringByNumber()

std::string getPropValStringByNumber ( const int  index) const
inherited

Retrieves property raw text values by number.

Parameters
indexIndex for which to get a property value
Returns
corresponding property value

◆ getSeriesDescription()

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

◆ getSeriesName()

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

◆ getTitle()

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.

◆ getTotalSeriesOutput()

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.

◆ isBackboneSeries()

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.

◆ isCharged2Plus()

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.

◆ isCharged3Plus()

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.

◆ isNeutralLossSeries()

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.

◆ isSeriesUsed()

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

◆ isSinglyCharged()

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.

◆ isValid()

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

◆ operator=()

ms_fragmentationrules & operator= ( const ms_fragmentationrules right)

Assignment operator.

Parameters
rightis the fragmentation rules to copy from.
Returns
reference to the current object

◆ setCharged2Plus()

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.

◆ setCharged3Plus()

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.

◆ setDefaultDelimiter()

void setDefaultDelimiter ( const char *  delim)
inherited

Allows to set a specific delimiter string to be used when no property-specific delimiter is supplied.

Parameters
delimString to set the default delimiter

◆ setMaxInternalMass()

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.

◆ setMinInternalMass()

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.

◆ setPreceedingComments()

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

◆ setPropertyName()

void setPropertyName ( const int  index,
const char *  name 
)
inherited

Changes name of the property with the given index.

Parameters
indexproperty number from 0 to (getNumberOfProperties()-1).
namenew name to be given to the property.

◆ setPropValBoolByName()

void setPropValBoolByName ( const char *  name,
const bool  value,
const bool  bFirstPlace = false 
)
inherited

Changes a boolean value of the first entry with the given name or creates a new property if it is not found.

A new value will be converted into 1 (for TRUE) or 0 (for FALSE) character.

Parameters
namea name of the property to find or add.
valuea new boolean value for the property.
bFirstPlaceif not found a new property can be put on top of the list.

◆ setPropValCharByName()

void setPropValCharByName ( const char *  name,
const char  value,
const bool  bFirstPlace = false 
)
inherited

Changes a single character value of the first entry with the given name or creates a new property if it is not found.

Parameters
namea name of the property to find or add.
valuea new single character value for the property.
bFirstPlaceif not found a new property can be put on top of the list.

◆ setPropValFloatByName()

void setPropValFloatByName ( const char *  name,
const double  value,
const bool  bFirstPlace = false 
)
inherited

Changes an floating point value of the first entry with the given name or creates a new property if it is not found.

Parameters
namea name of the property to find or add.
valuea new floating point value for the property.
bFirstPlaceif not found a new property can be put on top of the list.

◆ setPropValInt64ByName()

void setPropValInt64ByName ( const char *  name,
const INT64  value,
const bool  bFirstPlace = false 
)
inherited

Changes a long 64-bit integer value of the first entry with the given name or creates a new property if it is not found.

Parameters
namea name of the property to find or add.
valuea new long 64-bit integer value for the property.
bFirstPlaceif not found a new property can be put on top of the list.

◆ setPropValIntByName()

void setPropValIntByName ( const char *  name,
const int  value,
const bool  bFirstPlace = false 
)
inherited

Changes an integer value of the first entry with the given name or creates a new property if it is not found.

Parameters
namea name of the property to find or add.
valuea new integer value for the property.
bFirstPlaceif not found a new property can be put on top of the list.

◆ setPropValStringByName()

void setPropValStringByName ( const char *  name,
const char *  value,
const bool  bFirstPlace = false 
)
inherited

Changes a string value of the first entry with the given name or creates a new property if it is not found.

Parameters
namea name of the property to find or add.
valuea new string value for the property.
bFirstPlaceif not found a new property can be put on top of the list.

◆ setPropValStringByNumber()

void setPropValStringByNumber ( const int  index,
const char *  str 
)
inherited

Changes an string value of an existing property with the given index.

Parameters
indexan index of an existing property.
strString value for the property.

◆ setSeriesUsed()

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.

◆ setSinglyCharged()

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.

◆ setTitle()

void setTitle ( const char *  title)

Assigns a new title to the rule.

Parameters
titleis the new title.

◆ uncommentProp()

bool uncommentProp ( const int  index,
const char *  delimeter = 0 
)
inherited

Uncomments a line in the configuration file.

Removes a # and any white space. Finds the delimeter and extracts the property name and value.

Parameters
indexmust be a value between 0 and getNumberOfProperties().
delimeterwill often be a space. If not supplied, the default delimeter will be used.
Returns
true if the delimiter was found, false otherwise

◆ verifyRule()

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: