Tagger#

class pyopenms.Tagger#

Bases: object

Constructor for Tagger

The parameter max_charge_ should be >= min_charge_ Also max_tag_length should be >= min_tag_length

Parameters:
  • min_tag_length – The minimal sequence tag length

  • ppm – The tolerance for matching residue masses to peak delta masses

  • max_tag_length – The maximal sequence tag length

  • min_charge – Minimal fragment charge considered for each sequence tag

  • max_charge – Maximal fragment charge considered for each sequence tag

  • fixed_mods – A list of modification names. The modified residues replace the unmodified versions

  • var_mods – A list of modification names. The modified residues are added as additional entries to the list of residues

__init__(arg: pyopenms.Tagger, /) → None#
__init__(min_tag_length: int, tolerance: float, max_tag_length: int = 65535, min_charge: int = 1, max_charge: int = 1, fixed_mods: list[str] = [], var_mods: list[str] = [], tol_is_ppm: bool = True) → None

Methods

__init__(arg, /)

getTag(mzs)

Overloaded function.

setMaxCharge(max_charge)

Change the maximal charge considered by the tagger

getTag(mzs: collections.abc.Sequence[float]) → list[str]#
getTag(spec: pyopenms.MSSpectrum) → list[str]

Overloaded function.

  1. getTag(mzs: collections.abc.Sequence[float]) -> list[str]

Generate tags from mass vector mzs

The parameter tags is filled with one string per sequence tag It uses the standard residues from ResidueDB including the fixed and variable modifications given to the constructor

Parameters:

mzs – A vector of mz values, containing the mz values from a centroided fragment spectrum

Returns:

The vector of tags

  1. getTag(spec: pyopenms.MSSpectrum) -> list[str]

Generate tags from an MSSpectrum

It uses the standard residues from ResidueDB including the fixed and variable modifications given to the constructor.

Parameters:

spec – A centroided fragment spectrum

Returns:

The vector of tags, one string per sequence tag

setMaxCharge(max_charge: int) → None#

Change the maximal charge considered by the tagger

Allows to change the maximal considered charge e.g. based on a spectra precursor charge without calling the constructor multiple times

Parameters:

max_charge – The new maximal charge