proteometer.peptide#

Functions#

nip_off_pept(→ str)

Extracts the core peptide sequence surrounded by . characters.

strip_peptide(→ str)

Removes non-alphabetic characters and optionally nips off flanking characters.

Module Contents#

proteometer.peptide.nip_off_pept(peptide: str) str[source]#

Extracts the core peptide sequence surrounded by . characters.

Parameters:

peptide (str) – The peptide string containing flanking characters.

Returns:

The core peptide sequence without flanking characters.

Return type:

str

proteometer.peptide.strip_peptide(peptide: str, nip_off: bool = True) str[source]#

Removes non-alphabetic characters and optionally nips off flanking characters.

Parameters:
  • peptide (str) – The peptide string to be cleaned.

  • nip_off (bool, optional) – Whether to nip off flanking characters. Defaults to True.

Returns:

The cleaned peptide string.

Return type:

str