Matrix Science header
Public Types | Public Member Functions

ms_enzyme Class Reference
[Mascot configuration files module]

Represent a single entry in the enzymes file. More...

#include <ms_enzyme.hpp>

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

List of all members.

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_enzymeoperator= (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.

Detailed Description

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.

Examples:

config_enzymes.cpp, and tools_aahelper.cpp.


Member Enumeration Documentation

enum cuttertype

Definitions for types of cutter.

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

Enumerator:
UNDEFINED_CUTTER 

Undefined - normally due to an invalid parameter when calling a function.

NTERM_CUTTER 

N Terminus cutter - cuts before the specified residue(s).

CTERM_CUTTER 

C Terminus cutter - cuts after the specified residue(s).


Constructor & Destructor Documentation

ms_enzyme (  )

Default constructor.

An enzyme object should normally be created using matrix_science::ms_enzymefile::getEnzymeByNumber() or matrix_science::ms_enzymefile::getEnzymeByName().

ms_enzyme ( const ms_enzyme src )

Copying constructor.

Note:
You cannot use this constructor in programming languages other than C++.
Parameters:
srcis the enzyme to make a copy of.
~ms_enzyme (  )

Destructor.

Called automatically from C++ and other languages.


Member Function Documentation

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.

Parameters:
typeis either ms_enzyme::NTERM_CUTTER or ms_enzyme::CTERM_CUTTER.
cleaveAtStrOne or more residue letters which are the potential cleavage points.
restrictStrZero 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.

Parameters:
cutterNummust be in the range 0..getNumberOfCutters()-1.
leftResidueamino acid letter representing a residue before the cutting point.
rightResidueamino acid letter representing a residue after the cutting point.
Returns:
True if the enzyme can cleave at this 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.

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

See also:
getRestrict()
Parameters:
cutterNummust be in the range 0..getNumberOfCutters()-1.
Returns:
A string of possible cleaveage points.
Examples:
config_enzymes.cpp.
ms_enzyme::cuttertype getCutterType ( const int  cutterNum ) const

Return the number of cutters that make up the enzyme definition.

Parameters:
cutterNummust be in the range 0..getNumberOfCutters()-1.
Returns:
ms_enzyme::NTERM_CUTTER, or ms_enzyme::CTERM_CUTTER or ms_enzyme::UNDEFINED_CUTTER if cutterNum is an invalid value.
Examples:
config_enzymes.cpp.
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.

Returns:
The number of cutters.
Examples:
config_enzymes.cpp.
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 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).

See also:
getCleave()
Parameters:
cutterNummust be in the range 0..getNumberOfCutters()-1.
Returns:
A string of possible cleaveage points.
Examples:
config_enzymes.cpp.
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:

  • Independent = true indicates that the specificities should be treated as if independent digests had been performed on separate sample aliquots and the resulting peptide mixtures combined. Thus, any given peptide will conform to the specificity of one cleavage type only. In the case of CNBr+Trypsin, if Independent was true, you would not find any peptides resulting from cleavage after K or R at one end, and cleavage after M at the other.
  • Independent = false indicates that the specificities are combined, as if the reagents had been applied simultaneously or serially to a single sample aliquot.
See also:
getNumberOfCutters()
Returns:
True if the cutters are applied independently.
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.

Returns:
True if the enzyme is semi specific.
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.

Returns:
False if there are any errors in the enzyme definition.
ms_enzyme & operator= ( const ms_enzyme right )

C++ style operator= for copying.

Note:
This operator is only available in C++.

Acts identically to copyFrom().

Parameters:
rightis the enzyme definition to copy from.
Returns:
reference to the current object
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:

  • Independent = true indicates that the specificities should be treated as if independent digests had been performed on separate sample aliquots and the resulting peptide mixtures combined. Thus, any given peptide will conform to the specificity of one cleavage type only. In the case of CNBr+Trypsin, if Independent was true, you would not find any peptides resulting from cleavage after K or R at one end, and cleavage after M at the other.
  • Independent = false indicates that the specificities are combined, as if the reagents had been applied simultaneously or serially to a single sample aliquot.
See also:
getNumberOfCutters()
Parameters:
bitis 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

See also:
getPreceedingComments()
Parameters:
commentsany 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.

Parameters:
valueis the new flag to specify if the enzyme is semi specific.
Examples:
config_enzymes.cpp.
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().

Parameters:
stris 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:

  • "empty title" - Need to call setTitle().
  • "no cutting rules" - Need to call addCutter() at least once.
  • "more restrict than cleave rules for C-term" - probably an internal parser error.
  • "more restrict than cleave rules for N-term" - probably an internal parser error.
  • "no cleavage residues for a cutter" - addCutter() has been called with an empty or invalid cleaveAtStr().
  • "too many cleavage residues specified" - all residues have been specified for cleaving at.
  • "too many restricting residues specified" - all residues have been specified as restriction, meaning that the enzyme won't cut anywhere.
  • "cleavage residues must be uppercase A-Z" - a lower case letter or a non alphabetic character has been specified.
  • "restrict residues must be uppercase A-Z" - a lower case letter or a non alphabetic character has been specified.
Parameters:
errObjpassed error-object to store error messages.
Returns:
true if the enzyme definition is valid.

The documentation for this class was generated from the following files:

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:32