RescoreInput#

class pyopenms.RescoreInput#

Bases: object

Input to domain-agnostic Percolator.rescore(). Row ordering is preserved in the output.

__init__() → None#
__init__(arg: pyopenms.RescoreInput, /) → None

Methods

__init__()

set_features_np(features_2d[, shape, order, ...])

Set the feature matrix from a contiguous 2D numpy array of shape (n_rows, n_features).

set_is_decoy_np(flags_1d[, shape, order, ...])

Set the target/decoy labels from a 1D numpy uint8 array (non-zero = decoy).

Attributes

cv_group_keys

Per-row integer key to keep related rows in the same CV fold.

feature_matrix

Dense row-major features (n_rows x len(feature_names)), used when 'features' is empty; 'is_decoy' gives the number of rows.

feature_names

Names aligned 1:1 with feature columns; used for logging only.

features

[n_rows][n_features] scalar features per row.

is_decoy

Target (False) or decoy (True) label per row.

peptide_keys

Optional per-row peptide key for peptide-level q-values (Percolator parameter 'peptide_level').

property cv_group_keys: list[int]#

Per-row integer key to keep related rows in the same CV fold. Leave empty for no grouping.

property feature_matrix: list[float]#

Dense row-major features (n_rows x len(feature_names)), used when ‘features’ is empty; ‘is_decoy’ gives the number of rows.

property feature_names: list[str]#

Names aligned 1:1 with feature columns; used for logging only.

property features: list[list[float]]#

[n_rows][n_features] scalar features per row. Rows must have the same length.

property is_decoy: list[bool]#

Target (False) or decoy (True) label per row.

property peptide_keys: list[str]#

Optional per-row peptide key for peptide-level q-values (Percolator parameter ‘peptide_level’). Empty, or one entry per row.

set_features_np(features_2d: ndarray[dtype=float64, shape=(*, *), order='C', writable=False]) → None#

Set the feature matrix from a contiguous 2D numpy array of shape (n_rows, n_features). Much faster than assigning a Python list-of-lists for large inputs (single bulk memcpy per row instead of per-element conversion).

set_is_decoy_np(flags_1d: ndarray[dtype=uint8, shape=(*), order='C', writable=False]) → None#

Set the target/decoy labels from a 1D numpy uint8 array (non-zero = decoy).