alphabase.psm_reader.pfind_reader#
Functions:
|
|
|
|
|
Classes:
|
- class alphabase.psm_reader.pfind_reader.pFindReader(*, column_mapping: dict = None, modification_mapping: dict = None, fdr=0.01, keep_decoy=False, **kwargs)[source][source]#
Bases:
PSMReaderBase
Methods:
__init__
(*[, column_mapping, ...])The Base class for all PSMReaders.
- __init__(*, column_mapping: dict = None, modification_mapping: dict = None, fdr=0.01, keep_decoy=False, **kwargs)[source][source]#
The Base class for all PSMReaders. The key of the sub-classes for different search engine format is to re-define column_mapping and modification_mapping.
- Parameters:
column_mapping (dict, optional) – A dict that maps alphabase’s columns to other search engine’s. The key of the column_mapping is alphabase’s column name, and the value could be the column name or a list of column names in other engine’s result. If it is None, this dict will be init by self._init_column_mapping. The dict values could be either str or list, for exaplme:
` columns_mapping = { 'sequence': 'NakedSequence', #str 'charge': 'Charge', #str 'proteins':['Proteins','UniprotIDs'], # list, this reader will automatically detect all of them. } `
Defaults to None.modification_mapping (dict, optional) – A dict that maps alphabase’s modifications to other engine’s. If it is None, this dict will be init by default modification mapping for each search engine (see
psm_reader_yaml
). The dict values can be either str or list, for exaplme:` modification_mapping = { 'Oxidation@M': 'Oxidation (M)', # str 'Phospho@S': ['S(Phospho (STY))','S(ph)','pS'], # list, this reader will automatically detect all of them. } `
Defaults to None.fdr (float, optional) – FDR level to keep PSMs. Defaults to 0.01.
keep_decoy (bool, optional) – If keep decoy PSMs in self.psm_df. Defautls to False.
- column_mapping#
Dict structure same as column_mapping in Args.
- Type:
dict
- modification_mapping#
Dict structure same as modification_mapping in Args. We must use self.set_modification_mapping(new_mapping) to update it.
- Type:
dict
- _psm_df#
the PSM DataFrame after loading from search engines.
- Type:
pd.DataFrame
- psm_df#
the getter of self._psm_df
- Type:
pd.DataFrame
- keep_fdr#
The only PSMs with FDR<=keep_fdr were returned in self._psm_df.
- Type:
float
- keep_decoy#
If keep decoy PSMs in self.psm_df.
- Type:
bool
- _min_max_rt_norm#
if True, the ‘rt_norm’ values in self._psm_df will be normalized by rt_norm = (self.psm_df.rt-rt_min)/(rt_max-rt_min). It is useful to normalize iRT values as they contain negative values. Defaults to False.
- Type:
bool