EnzymaticDigestion#

class pyopenms.EnzymaticDigestion#

Bases: object

Cython implementation of _EnzymaticDigestion

Original C++ documentation is available here

Class for the enzymatic digestion of proteins

Digestion can be performed using simple regular expressions, e.g. [KR] | [^P] for trypsin. Also missed cleavages can be modeled, i.e. adjacent peptides are not cleaved due to enzyme malfunction/access restrictions. If n missed cleavages are allowed, all possible resulting peptides (cleaved and uncleaved) with up to n missed cleavages are returned. Thus no random selection of just n specific missed cleavage sites is performed.

__init__()#

Overload:

__init__(self) None

Overload:

__init__(self, in_0: EnzymaticDigestion) None

Methods

__init__

Overload:

countInternalCleavageSites(self, sequence)

Returns the number of internal cleavage sites for this sequence.

digestUnmodified(self, sequence, output, ...)

Performs the enzymatic digestion of an unmodified sequence

getEnzymeName(self)

Returns the enzyme for the digestion

getMissedCleavages(self)

Returns the max.

getSpecificity(self)

Returns the specificity for the digestion

getSpecificityByName(self, name)

Returns the specificity by name.

isValidProduct(self, sequence, pos, length, ...)

Boolean operator returns true if the peptide fragment starting at position pos with length length within the sequence sequence generated by the current enzyme

setEnzyme(self, enzyme)

Sets the enzyme for the digestion

setMissedCleavages(self, missed_cleavages)

Sets the max.

setSpecificity(self, spec)

Sets the specificity for the digestion (default is SPEC_FULL)

Specificity#

alias of __Specificity

countInternalCleavageSites(self, sequence: bytes | str | String) int#

Returns the number of internal cleavage sites for this sequence.

digestUnmodified(self, sequence: StringView, output: List[StringView], min_length: int, max_length: int) int#

Performs the enzymatic digestion of an unmodified sequence

By returning only references into the original string this is very fast

Parameters:
  • sequence – Sequence to digest

  • output – Digestion products

  • min_length – Minimal length of reported products

  • max_length – Maximal length of reported products (0 = no restriction)

Returns:

Number of discarded digestion products (which are not matching length restrictions)

getEnzymeName(self) bytes | str | String#

Returns the enzyme for the digestion

getMissedCleavages(self) int#

Returns the max. number of allowed missed cleavages for the digestion

getSpecificity(self) int#

Returns the specificity for the digestion

getSpecificityByName(self, name: bytes | str | String) int#

Returns the specificity by name. Returns SPEC_UNKNOWN if name is not valid

isValidProduct(self, sequence: bytes | str | String, pos: int, length: int, ignore_missed_cleavages: bool) bool#

Boolean operator returns true if the peptide fragment starting at position pos with length length within the sequence sequence generated by the current enzyme

Checks if peptide is a valid digestion product of the enzyme, taking into account specificity and the MC flag provided here

Parameters:
  • protein – Protein sequence

  • pep_pos – Starting index of potential peptide

  • pep_length – Length of potential peptide

  • ignore_missed_cleavages – Do not compare MC’s of potential peptide to the maximum allowed MC’s

Returns:

True if peptide has correct n/c terminals (according to enzyme, specificity and missed cleavages)

setEnzyme(self, enzyme: DigestionEnzyme) None#

Sets the enzyme for the digestion

setMissedCleavages(self, missed_cleavages: int) None#

Sets the max. number of allowed missed cleavages for the digestion (default is 0). This setting is ignored when log model is used

setSpecificity(self, spec: int) None#

Sets the specificity for the digestion (default is SPEC_FULL)