Residue#

class pyopenms.Residue#

Bases: object

Cython implementation of _Residue

Original C++ documentation is available here

__init__()#

Overload:

__init__(self) None

Overload:

__init__(self, in_0: Residue) None

Overload:

__init__(self, name: bytes | str | String, three_letter_code: bytes | str | String, one_letter_code: bytes | str | String, formula: EmpiricalFormula) None

Methods

__init__

Overload:

addLossFormula(self, in_0)

Adds a neutral loss formula

addLossName(self, name)

Adds neutral loss molecule name

addNTermLossFormula(self, in_0)

Adds N-terminal losses

addNTermLossName(self, name)

Adds a N-terminal loss name

addResidueSet(self, residue_sets)

Adds a residue set to the residue sets

addSynonym(self, synonym)

Adds a synonym

getAverageWeight

Overload:

getBackboneBasicityLeft(self)

Returns the backbone basicitiy if located in N-terminal direction

getBackboneBasicityRight(self)

Returns the C-terminal direction backbone basicitiy

getFormula

Overload:

getInternalToAIon(self)

getInternalToBIon(self)

getInternalToCIon(self)

getInternalToCTerm(self)

getInternalToFull(self)

getInternalToNTerm(self)

getInternalToXIon(self)

getInternalToYIon(self)

getInternalToZIon(self)

getLossFormulas(self)

Returns the neutral loss formulas

getLossNames(self)

Gets neutral loss name (if there is one, else returns an empty string)

getLowMassIons(self)

Returns a vector of formulas with the low mass markers of the residue

getModification(self)

getModificationName(self)

Returns the name of the modification to the modification

getMonoWeight

Overload:

getNTermLossFormulas(self)

Returns N-terminal loss formulas

getNTermLossNames(self)

Returns the N-terminal loss names

getName(self)

Returns the name of the residue

getOneLetterCode(self)

Returns the name as one letter code

getPiValue(self)

Calculates the isoelectric point using the pk values

getPka(self)

Returns the pka of the residue

getPkb(self)

Returns the pkb of the residue

getPkc(self)

Returns the pkc of the residue if it exists otherwise -1

getResidueSets(self)

Returns the residue sets this residue is contained in

getResidueTypeName(self, res_type)

Returns the ion name given as a residue type

getSideChainBasicity(self)

Returns the side chain basicity

getSynonyms(self)

Returns the sysnonyms

getThreeLetterCode(self)

Returns the name of the residue as three letter code

hasNTermNeutralLosses(self)

True if N-terminal neutral losses are set

hasNeutralLoss(self)

True if the residue has neutral loss

isInResidueSet(self, residue_set)

True if the residue is contained in the set

isModified(self)

True if the residue is a modified one

residueTypeToIonLetter(self, res_type)

Helper for mapping residue types to letters for Text annotations and labels

setAverageWeight(self, weight)

Sets average weight of the residue (must be full, with N and C-terminus)

setBackboneBasicityLeft(self, gb_bb_l)

Sets the N-terminal direction backbone basicitiy

setBackboneBasicityRight(self, gb_bb_r)

Sets the C-terminal direction backbone basicity

setFormula(self, formula)

Sets empirical formula of the residue (must be full, with N and C-terminus)

setLossFormulas(self, in_0)

Sets the neutral loss formulas

setLossNames(self, name)

Sets the neutral loss molecule name

setLowMassIons(self, low_mass_ions)

Sets the low mass marker ions as a vector of formulas

setModification

Overload:

setModificationByDiffMonoMass(self, diffMonoMass)

Sets the modification by monoisotopic mass difference in Da; checks if present in ModificationsDB with tolerance and adds a "user-defined" modification if not (for later lookups).

setMonoWeight(self, weight)

Sets monoisotopic weight of the residue (must be full, with N and C-terminus)

setNTermLossFormulas(self, in_0)

Sets the N-terminal losses

setNTermLossNames(self, name)

Sets the N-terminal loss names

setName(self, name)

Sets the name of the residue

setOneLetterCode(self, one_letter_code)

Sets the name as one letter code

setPka(self, value)

Sets the pka of the residue

setPkb(self, value)

Sets the pkb of the residue

setPkc(self, value)

Sets the pkc of the residue

setResidueSets(self, residues_sets)

Sets the residue sets the amino acid is contained in

setSideChainBasicity(self, gb_sc)

Sets the side chain basicity

setSynonyms(self, synonyms)

Sets the synonyms

setThreeLetterCode(self, three_letter_code)

Sets the name of the residue as three letter code

ResidueType#

alias of __ResidueType

addLossFormula(self, in_0: EmpiricalFormula) None#

Adds a neutral loss formula

addLossName(self, name: bytes | str | String) None#

Adds neutral loss molecule name

addNTermLossFormula(self, in_0: EmpiricalFormula) None#

Adds N-terminal losses

addNTermLossName(self, name: bytes | str | String) None#

Adds a N-terminal loss name

addResidueSet(self, residue_sets: bytes | str | String) None#

Adds a residue set to the residue sets

addSynonym(self, synonym: bytes | str | String) None#

Adds a synonym

getAverageWeight()#

Overload:

getAverageWeight(self) float

Returns average weight of the residue

Overload:

getAverageWeight(self, res_type: int) float
getBackboneBasicityLeft(self) float#

Returns the backbone basicitiy if located in N-terminal direction

getBackboneBasicityRight(self) float#

Returns the C-terminal direction backbone basicitiy

getFormula()#

Overload:

getFormula(self) EmpiricalFormula

Returns the empirical formula of the residue

Overload:

getFormula(self, res_type: int) EmpiricalFormula
getInternalToAIon(self) EmpiricalFormula#
getInternalToBIon(self) EmpiricalFormula#
getInternalToCIon(self) EmpiricalFormula#
getInternalToCTerm(self) EmpiricalFormula#
getInternalToFull(self) EmpiricalFormula#
getInternalToNTerm(self) EmpiricalFormula#
getInternalToXIon(self) EmpiricalFormula#
getInternalToYIon(self) EmpiricalFormula#
getInternalToZIon(self) EmpiricalFormula#
getLossFormulas(self) List[EmpiricalFormula]#

Returns the neutral loss formulas

getLossNames(self) List[bytes]#

Gets neutral loss name (if there is one, else returns an empty string)

getLowMassIons(self) List[EmpiricalFormula]#

Returns a vector of formulas with the low mass markers of the residue

getModification(self) ResidueModification#
getModificationName(self) bytes | str | String#

Returns the name of the modification to the modification

getMonoWeight()#

Overload:

getMonoWeight(self) float

Returns monoisotopic weight of the residue

Overload:

getMonoWeight(self, res_type: int) float
getNTermLossFormulas(self) List[EmpiricalFormula]#

Returns N-terminal loss formulas

getNTermLossNames(self) List[bytes]#

Returns the N-terminal loss names

getName(self) bytes | str | String#

Returns the name of the residue

getOneLetterCode(self) bytes | str | String#

Returns the name as one letter code

getPiValue(self) float#

Calculates the isoelectric point using the pk values

getPka(self) float#

Returns the pka of the residue

getPkb(self) float#

Returns the pkb of the residue

getPkc(self) float#

Returns the pkc of the residue if it exists otherwise -1

getResidueSets(self) Set[bytes]#

Returns the residue sets this residue is contained in

getResidueTypeName(self, res_type: int) bytes | str | String#

Returns the ion name given as a residue type

getSideChainBasicity(self) float#

Returns the side chain basicity

getSynonyms(self) Set[bytes]#

Returns the sysnonyms

getThreeLetterCode(self) bytes | str | String#

Returns the name of the residue as three letter code

hasNTermNeutralLosses(self) bool#

True if N-terminal neutral losses are set

hasNeutralLoss(self) bool#

True if the residue has neutral loss

isInResidueSet(self, residue_set: bytes | str | String) bool#

True if the residue is contained in the set

isModified(self) bool#

True if the residue is a modified one

residueTypeToIonLetter(self, res_type: int) bytes#

Helper for mapping residue types to letters for Text annotations and labels

setAverageWeight(self, weight: float) None#

Sets average weight of the residue (must be full, with N and C-terminus)

setBackboneBasicityLeft(self, gb_bb_l: float) None#

Sets the N-terminal direction backbone basicitiy

setBackboneBasicityRight(self, gb_bb_r: float) None#

Sets the C-terminal direction backbone basicity

setFormula(self, formula: EmpiricalFormula) None#

Sets empirical formula of the residue (must be full, with N and C-terminus)

setLossFormulas(self, in_0: List[EmpiricalFormula]) None#

Sets the neutral loss formulas

setLossNames(self, name: List[bytes]) None#

Sets the neutral loss molecule name

setLowMassIons(self, low_mass_ions: List[EmpiricalFormula]) None#

Sets the low mass marker ions as a vector of formulas

setModification()#

Overload:

setModification(self, name: bytes | str | String) None

Sets the modification by name; the mod should be present in ModificationsDB

Overload:

setModification(self, mod: ResidueModification) None

Sets the modification by a ResidueModification object; checks if present in ModificationsDB and adds if not.

setModificationByDiffMonoMass(self, diffMonoMass: float) None#

Sets the modification by monoisotopic mass difference in Da; checks if present in ModificationsDB with tolerance and adds a “user-defined” modification if not (for later lookups).

setMonoWeight(self, weight: float) None#

Sets monoisotopic weight of the residue (must be full, with N and C-terminus)

setNTermLossFormulas(self, in_0: List[EmpiricalFormula]) None#

Sets the N-terminal losses

setNTermLossNames(self, name: List[bytes]) None#

Sets the N-terminal loss names

setName(self, name: bytes | str | String) None#

Sets the name of the residue

setOneLetterCode(self, one_letter_code: bytes | str | String) None#

Sets the name as one letter code

setPka(self, value: float) None#

Sets the pka of the residue

setPkb(self, value: float) None#

Sets the pkb of the residue

setPkc(self, value: float) None#

Sets the pkc of the residue

setResidueSets(self, residues_sets: Set[bytes]) None#

Sets the residue sets the amino acid is contained in

setSideChainBasicity(self, gb_sc: float) None#

Sets the side chain basicity

setSynonyms(self, synonyms: Set[bytes]) None#

Sets the synonyms

setThreeLetterCode(self, three_letter_code: bytes | str | String) None#

Sets the name of the residue as three letter code