Percolator#

class pyopenms.Percolator(*args, **kwargs)#

Bases: object

In-process Percolator: semi-supervised target/decoy rescoring with q-values + PEPs.

Two entry points:

  • rescore(peptide_ids, feature_names=[]): PSM-specific sugar that stamps percolator_score / _q_value / _pep as meta values on each PeptideHit.

  • rescore(rescore_input): domain-agnostic. Accepts any (feature matrix, target/decoy labels, optional CV grouping keys) triple. Returns a RescoreOutput with per-row scores, q-values, PEPs.

Instances are NOT concurrent-safe; construct one per worker.

__init__(self) → None#

Attributes

getDefaults

Returns a copy of the default parameters

getName

Returns the name

getParameters

Returns a copy of the parameters

getSubsections

rescore

Overloaded function.

rescorePSMs

Rescore PSMs in place on the standard Percolator (.pin) feature set.

setName

Sets the name

setParameters

Sets the parameters

getDefaults#

Returns a copy of the default parameters

getName#

Returns the name

getParameters#

Returns a copy of the parameters

getSubsections#
rescore#

Overloaded function.

  1. rescore(self, peptide_ids: collections.abc.Sequence[pyopenms._pyopenms_kernel.PeptideIdentification], feature_names: list[str] = []) -> None

Rescore PSMs in place; appends percolator_* meta values.

  1. rescore(self, input: pyopenms._pyopenms_analysis.RescoreInput) -> pyopenms._pyopenms_analysis.RescoreOutput

Domain-agnostic rescoring on a feature matrix.

rescorePSMs#

Rescore PSMs in place on the standard Percolator (.pin) feature set.

Stamps the PIN features, trains, and writes SVM score (MS:1001492), q-value (MS:1001491) and PEP (MS:1001493) onto each hit. The main score becomes the one selected by score_type (“q-value”, “pep” or “svm”), and the original score is kept as a meta value named after the old score type. Hits that cannot be rescored (no peptide evidence, no target/decoy annotation or a missing feature) get q-value = PEP = 1 and SVM score = -100. The stamped features are removed again. Returns the number of rescored hits.

feature_set: e.g. PercolatorInfile.getStandardFeatureSet(min_charge, max_charge) plus extra features plus “Peptide” and “Proteins”.

setName#

Sets the name

setParameters#

Sets the parameters