This class encapsulates a single entry (an instrument) from a fragmentation_rules
file.
More...
#include <ms_fragmentationrules.hpp>
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_fragmentationrules & | operator= (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. |
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.
enum 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.
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.
bool anyNLseriesUsed | ( | const int | series ) | const |
Will return true if any 'neutral loss' series is specified for this series.
series | must be a number between getFirstSeries() and getLastSeries() inclusive. |
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.
right | is 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.
int getFirstSeries | ( | ) | [static] |
The lowest series number that can be used.
int getLastSerie | ( | ) | [static] |
The highest series number that can be used.
int getLastSeries | ( | ) | [static] |
The highest series number that can be used.
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.
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.
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
std::string getSeriesDescription | ( | const int | series ) | [static] |
Returns a description string for a given series.
series | must be a number between getFirstSeries() and getLastSeries() inclusive. |
std::string getSeriesName | ( | const int | series ) | [static] |
Returns a short series name.
series | must be a number between getFirstSeries() and getLastSeries() inclusive. |
std::string getTitle | ( | ) | const |
Returns the title of the instrument.
This is obtained from the
title:
line in the fragmentation_rules
file.
int getTotalSeriesOutput | ( | ) | [static] |
Returns the length of the series string output in a Mascot results file.
bool isBackboneSeries | ( | const int | series ) | [static] |
Returns true if the series is a 'backbone' fragment.
series | must be a number between getFirstSeries() and getLastSeries() inclusive. |
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 isNeutralLossSeries | ( | const int | series ) | [static] |
Returns true if the series is a 'neutral loss' series.
series | must be a number between getFirstSeries() and getLastSeries() inclusive. |
bool isSeriesUsed | ( | const int | series ) | const |
Returns true if a given series is specified for the instrument.
Currently supported series are (FRAG_SERIES_TYPE):
In addition, two more rules may be specified:
series | must be a number between getFirstSeries() and getLastSeries() inclusive. |
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.
The verifyRule() function will generally be more useful.
ms_fragmentationrules & operator= | ( | const ms_fragmentationrules & | right ) |
Assignment operator.
right | is the fragmentation rules to copy from. |
void setCharged2Plus | ( | const bool | value ) |
Change the availability the of 'doubly charged 2+' fragmentation rule.
value | should 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.
value | should 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.
mass | The 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.
mass | The 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
comments | any 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.
series | must be a number between getFirstSeries() and getLastSeries() inclusive. |
val | is a boolean value to specify whether the series should be considered. |
void setSinglyCharged | ( | const bool | value ) |
Change the availability of the 'singly charged' fragmentation rule.
value | should 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.
title | is 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.
errObj | error-object to store error messages. |
tryToFix | if true, try to fix any problems encountered. |
Copyright © 2022 Matrix Science Ltd. All Rights Reserved. Generated on Thu Mar 31 2022 01:12:32 |