BasicProteinInferenceAlgorithm#
- class pyopenms.BasicProteinInferenceAlgorithm#
Bases:
object
Cython implementation of _BasicProteinInferenceAlgorithm
- Original C++ documentation is available here
– Inherits from [‘DefaultParamHandler’, ‘ProgressLogger’]
Algorithm class that implements simple protein inference by aggregation of peptide scores.
It has multiple parameter options like the aggregation method, when to distinguish peptidoforms, and if you want to use shared peptides (“use_shared_peptides”). First, the best PSM per spectrum is used, then only the best PSM per peptidoform is aggregated. Peptidoforms can optionally be distinguished via the treat_X_separate parameters: - Modifications (modified sequence string) - Charge states The algorithm assumes posteriors or posterior error probabilities and converts to posteriors initially. Possible aggregation methods that can be set via the parameter “aggregation_method” are: - “best” (default) - “sum” - “product” (ignoring zeroes) Annotation of the number of peptides used for aggregation can be disabled (see parameters). Supports multiple runs but goes through them one by one iterating over the full PeptideIdentification vector. Warning: Does not “link” the peptides to the resulting protein run. If you wish to do that you have to do it manually.
Usage:
- __init__(self) None #
Methods
__init__
(self)endProgress
(self)Ends the progress display
getDefaults
(self)Returns the default parameters
getLogType
(self)Returns the type of progress log being used
getName
(self)Returns the name
getParameters
(self)Returns the parameters
getSubsections
(self)nextProgress
(self)Increment progress by 1 (according to range begin-end)
Overload:
setLogType
(self, in_0)Sets the progress log that should be used.
setName
(self, in_0)Sets the name
setParameters
(self, param)Sets the parameters
setProgress
(self, value)Sets the current progress
startProgress
(self, begin, end, label)- endProgress(self) None #
Ends the progress display
- getLogType(self) int #
Returns the type of progress log being used
- getSubsections(self) List[bytes] #
- nextProgress(self) None #
Increment progress by 1 (according to range begin-end)
- run()#
Overload:
- run(self, pep_ids: List[PeptideIdentification], prot_ids: List[ProteinIdentification]) None
Performs basic aggregation-based inference per ProteinIdentification run. See class help.
- Parameters:
pep_ids – Vector of peptide identifications
prot_ids – Vector of protein identification runs. Scores will be overwritten and groups added.
- Returns:
Writes its results into prot_ids
Overload:
- run(self, pep_ids: List[PeptideIdentification], prot_id: ProteinIdentification) None
Performs basic aggregation-based inference on single ProteinIdentification run. See class help.
- Parameters:
pep_ids – Vector of peptide identifications
prot_id – ProteinIdentification run with possible proteins. Scores will be overwritten and groups added.
- Returns:
Writes its results into prot_ids
Overload:
- run(self, cmap: ConsensusMap, prot_id: ProteinIdentification, include_unassigned: bool) None
Performs basic aggregation-based inference on identifications in a ConsensusMap. See class help.
prot_id should contain the union of all proteins in the map. E.g. use ConsensusMapMergerAlgorithm and then pass the first=merged run.
- Parameters:
cmap – ConsensusMap = Consensus features with metadata and peptide identifications
prot_id – ProteinIdentification run with possible proteins. Scores will be overwritten and groups added.
- Returns:
Writes its results into prot_ids
- setLogType(self, in_0: int) None #
Sets the progress log that should be used. The default type is NONE!
- setProgress(self, value: int) None #
Sets the current progress