alphabase.psm_reader.maxquant_reader

Reader for MaxQuant data.

Classes:

MaxQuantReader(*[, column_mapping, ...])

Reader for MaxQuant data.

ModifiedSequenceReader(*[, column_mapping, ...])

Reader for MaxQuant-like data.

Functions:

parse_mod_seq(modseq[, mod_sep, fixed_C57])

Extract modifications and sites from the modified sequence (modseq).

register_readers()

Register MaxQuant reader.

replace_parentheses_with_brackets(modseq)

Replace parentheses with brackets in the modified sequence.

class alphabase.psm_reader.maxquant_reader.MaxQuantReader(*, column_mapping: dict | None = None, modification_mapping: dict | None = None, mod_seq_columns: List[str] | None = None, fdr: float = 0.01, keep_decoy: bool = False, rt_unit: str | None = None, fixed_C57: bool | None = None, **kwargs)[source][source]

Bases: ModifiedSequenceReader

Reader for MaxQuant data.

Methods:

__init__(*[, column_mapping, ...])

Reader for MaxQuant data.

__init__(*, column_mapping: dict | None = None, modification_mapping: dict | None = None, mod_seq_columns: List[str] | None = None, fdr: float = 0.01, keep_decoy: bool = False, rt_unit: str | None = None, fixed_C57: bool | None = None, **kwargs)[source][source]

Reader for MaxQuant data.

See documentation of PSMReaderBase for more information.

Parameters:
  • fixed_C57 (bool, optional) – If true, the search engine will not show Carbamidomethyl in the modified sequences. by default read from psm_reader_yaml key fixed_C57.

  • parameters. (See documentation of PSMReaderBase for the rest of)

class alphabase.psm_reader.maxquant_reader.ModifiedSequenceReader(*, column_mapping: dict | None = None, modification_mapping: dict | None = None, mod_seq_columns: List[str] | None = None, fdr: float = 0.01, keep_decoy: bool = False, rt_unit: str | None = None, **kwargs)[source][source]

Bases: PSMReaderBase, ABC

Reader for MaxQuant-like data.

Methods:

__init__(*[, column_mapping, ...])

Reader for MaxQuant-like data (in terms of modification loading and decoy translation).

__init__(*, column_mapping: dict | None = None, modification_mapping: dict | None = None, mod_seq_columns: List[str] | None = None, fdr: float = 0.01, keep_decoy: bool = False, rt_unit: str | None = None, **kwargs)[source][source]

Reader for MaxQuant-like data (in terms of modification loading and decoy translation).

See documentation of PSMReaderBase for more information.

See documentation of PSMReaderBase for the parameters.

alphabase.psm_reader.maxquant_reader.parse_mod_seq(modseq: str, mod_sep: str = '()', fixed_C57: bool = True) tuple[source]

Extract modifications and sites from the modified sequence (modseq).

Parameters:
  • modseq (str) – modified sequence to extract modifications.

  • mod_sep (str, optional) – separator to indicate the modification section. Defaults to ‘()’

  • fixed_C57 (bool) – If Carbamidomethyl@C is a fixed modification and not displayed in the sequence. Defaults to True.

Returns:

str: naked peptide sequence

str: modification names, separated by ‘;’

str: modification sites, separated by ‘;’. 0 for N-term; -1 for C-term; 1 to N for normal modifications.

Return type:

tuple

alphabase.psm_reader.maxquant_reader.register_readers() None[source][source]

Register MaxQuant reader.

alphabase.psm_reader.maxquant_reader.replace_parentheses_with_brackets(modseq: str) str[source]

Replace parentheses with brackets in the modified sequence.