Represent a single entry in the enzymes
file.
More...
#include <ms_enzyme.hpp>
Public Types | |
enum | cuttertype { UNDEFINED_CUTTER = 0x0000, NTERM_CUTTER = 0x0001, CTERM_CUTTER = 0x0002 } |
Definitions for types of cutter. More... | |
Public Member Functions | |
ms_enzyme () | |
Default constructor. | |
ms_enzyme (const ms_enzyme &src) | |
Copying constructor. | |
~ms_enzyme () | |
Destructor. | |
void | addCutter (const cuttertype type, const char *cleaveAtStr, const char *restrictStr) |
Adds an cutter to the enzyme. | |
bool | canCleave (const int cutterNum, const char leftResidue, const char rightResidue) const |
Returns TRUE if the cutter can cut between the two residues. | |
void | clearAllCutters () |
Deletes all cutters from the list. | |
void | copyFrom (const ms_enzyme *right) |
Can be used to create a clone. | |
void | defaultValues () |
Use this member to re-initialise an instance to default values. | |
std::string | getCleave (const int cutterNum) const |
Returns the list of cleavage points for a cutter. | |
ms_enzyme::cuttertype | getCutterType (const int cutterNum) const |
Return the number of cutters that make up the enzyme definition. | |
int | getNumberOfCutters () const |
Returns the number of cutters. | |
std::string | getPreceedingComments () const |
Returns any comments preceeding the section. | |
std::string | getRestrict (const int cutterNum) const |
Returns the list of restriction points for a cutter. | |
std::string | getTitle () const |
Returns a name of the enzyme as appears in the file. | |
bool | isIndependent () const |
Check whether multiple enzymes have been applied independently. | |
bool | isSemiSpecific () const |
Returns TRUE if the enzyme is semi-specific. | |
bool | isValid () const |
Use this method to do basic check on a newly created object. | |
ms_enzyme & | operator= (const ms_enzyme &right) |
C++ style operator= for copying. | |
void | setIndependent (const bool bit) |
Sets the flag that specifies whether multiple enzymes have been applied independently. | |
void | setPreceedingComments (const std::string &comments) |
Sets any comments preceeding the section. | |
void | setSemiSpecific (const bool value) |
Sets a new value for the semi specific flag. | |
void | setTitle (const char *str) |
Sets a new title for the enzyme. | |
bool | verifyEnzyme (ms_errs *errObj) const |
Tries to detect any inconsistencies in the enzyme definition. |
Represent a single entry in the enzymes
file.
An instance of this class is normally be created by calling matrix_science::ms_enzymefile::getEnzymeByNumber() or matrix_science::ms_enzymefile::getEnzymeByName() and should then only be used in 'read-only' mode.
As well as 'simple' enzymes, the following cases are supported:
In case of independent enzymes an instance contains several enzyme definitions that can be iterated through. Otherwise several enzymes with mixed-term cutting are combined together.
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 cuttertype |
Definitions for types of cutter.
See Using enumerated values and static const ints in Perl, Java, Python and C#.
ms_enzyme | ( | ) |
Default constructor.
An enzyme object should normally be created using matrix_science::ms_enzymefile::getEnzymeByNumber() or matrix_science::ms_enzymefile::getEnzymeByName().
Copying constructor.
src | is the enzyme to make a copy of. |
~ms_enzyme | ( | ) |
Destructor.
Called automatically from C++ and other languages.
void addCutter | ( | const cuttertype | type, |
const char * | cleaveAtStr, | ||
const char * | restrictStr | ||
) |
Adds an cutter to the enzyme.
This function doesn't perform any checks for valid residues etc, so the verifyEnzyme() function should be called after adding a cutter.
type | is either ms_enzyme::NTERM_CUTTER or ms_enzyme::CTERM_CUTTER. |
cleaveAtStr | One or more residue letters which are the potential cleavage points. |
restrictStr | Zero or more residue letters that are restriction points. |
bool canCleave | ( | const int | cutterNum, |
const char | leftResidue, | ||
const char | rightResidue | ||
) | const |
Returns TRUE if the cutter can cut between the two residues.
Gives an answer for the question: Will the enzyme cut at the this position or not?
This function doesn't take into account the semi specific flag.
cutterNum | must be in the range 0..getNumberOfCutters()-1. |
leftResidue | amino acid letter representing a residue before the cutting point. |
rightResidue | amino acid letter representing a residue after the cutting point. |
void clearAllCutters | ( | ) |
Deletes all cutters from the list.
Only useful when defining enzymes 'on the fly'.
void copyFrom | ( | const ms_enzyme * | right ) |
Can be used to create a clone.
Simply create an instance of the class using the default constructor and call this method.
right | pointer to another instance to copy from. |
void defaultValues | ( | ) |
Use this member to re-initialise an instance to default values.
The default values are no cutters, no title, independent = false and semiSpecific = false.
Reimplemented from ms_customproperty.
std::string getCleave | ( | const int | cutterNum ) | const |
Returns the list of cleavage points for a cutter.
Returns the residues after which an enzyme may cut (for a CTERM_CUTTER) or before which an enzyme may cut (for an NTERM_CUTTER).
cutterNum | must be in the range 0..getNumberOfCutters()-1. |
ms_enzyme::cuttertype getCutterType | ( | const int | cutterNum ) | const |
Return the number of cutters that make up the enzyme definition.
cutterNum | must be in the range 0..getNumberOfCutters()-1. |
int getNumberOfCutters | ( | ) | const |
Returns the number of cutters.
For most enzymes, there will be just one cutter. See isIndependent() for details of multiple cutters in an enzyme.
The limit of 5 cutters per enzyme was raised to a limit of 20 cutters per enzyme in Parser 2.3.01.
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 getRestrict | ( | const int | cutterNum ) | const |
Returns the list of restriction points for a cutter.
Returns the residues after which an enzyme may cut (for a CTERM_CUTTER) or before which an enzyme may cut (for an NTERM_CUTTER).
cutterNum | must be in the range 0..getNumberOfCutters()-1. |
bool isIndependent | ( | ) | const |
Check whether multiple enzymes have been applied independently.
In cases where a single enzyme has been used, the 'independent' flag has no meaning and would normally be set to false. Where multiple enzymes are used on a single sample, these can have been applied in two different ways:
bool isSemiSpecific | ( | ) | const |
Returns TRUE if the enzyme is semi-specific.
Enzymes don't function perfectly all the time. In most cases where they fail to cut at the specified cleavage point, this only affects one terminus. In Mascot, when a semi specific enzyme is defined, peptides only need to conform to the cleavage specificity at one end.
All enzymes represented by the entry have to be either semi-specific or not.
bool isValid | ( | ) | const |
Use this method to do basic check on a newly created object.
This function calls verifyEnzyme() and is merely provided to give a consistently available function interface to the object. To determine the cause of any inconsistencies or errors, call verifyEnzyme() with an error object.
C++ style operator= for copying.
Acts identically to copyFrom().
right | is the enzyme definition to copy from. |
void setIndependent | ( | const bool | bit ) |
Sets the flag that specifies whether multiple enzymes have been applied independently.
In cases where a single enzyme has been used, the 'independent' flag has no meaning and would normally be set to false. Where multiple enzymes are used on a single sample, these can have been applied in two different ways:
bit | is the new value. |
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 setSemiSpecific | ( | const bool | value ) |
Sets a new value for the semi specific flag.
C++ If you load an enzyme using matrix_science::ms_enzymefile::getEnzymeByNumber() or matrix_science::ms_enzymefile::getEnzymeByName(), you will not be able to call this member because those functions return a const pointer.
Calling this function will not affect the enzymes file. See ms_enzymefile::updateByNumber() and ms_enzymefile::updateByName().
Enzymes don't function perfectly all the time. In most cases where they fail to cut at the specified cleavage point, this only affects one terminus. In Mascot, when a semi specific enzyme is defined, peptides only need to conform to the cleavage specificity at one end.
All enzymes represented by the entry have to be either semi-specific or not.
value | is the new flag to specify if the enzyme is semi specific. |
void setTitle | ( | const char * | str ) |
Sets a new title for the enzyme.
C++: If you load an enzyme using matrix_science::ms_enzymefile::getEnzymeByNumber() or matrix_science::ms_enzymefile::getEnzymeByName(), you will not be able to call this member because those functions return a const pointer.
Calling this will not affect the enzymes
file. See ms_enzymefile::updateByNumber() and ms_enzymefile::updateByName().
str | is the new name for the enzyme. |
bool verifyEnzyme | ( | ms_errs * | errObj ) | const |
Tries to detect any inconsistencies in the enzyme definition.
If errors are found in the enzyme definition, the ms_errs::ERR_MSP_ENZYME_DEFINITION_PROBLEM error will be set, once for each error. Each error message will also include one of following additional text strings.
The reason or method required to 'fix' the error are the following:
errObj | passed error-object to store error messages. |
Copyright © 2022 Matrix Science Ltd. All Rights Reserved. Generated on Thu Mar 31 2022 01:12:32 |