corneto.methods.compute_phonemes_scores#
- corneto.methods.compute_phonemes_scores(pvalues, *, fold_changes=None, pvalue_threshold=0.05, fold_change_threshold=None, direction='both', scale=True)#
Compute PHONEMeS node scores from p-values and fold changes.
Flat mappings, pandas Series, and one-dimensional arrays represent one condition. Nested mappings, pandas DataFrames, and two-dimensional arrays represent sites by conditions. The returned object preserves the input container type for NumPy and pandas inputs; mappings return dictionaries.
Negative scores reward measurements satisfying the selected evidence criteria, while positive scores penalize unsupported measurements.
- Parameters:
pvalues – P-values indexed or ordered by phosphosite.
fold_changes – Optional fold changes with the same structure and labels.
pvalue_threshold (float) – Significance threshold in
(0, 1].fold_change_threshold (float | None) – Optional nonnegative absolute fold-change threshold.
direction (str) – Fold-change direction:
"both","up", or"down".scale (bool) – Scale positive and negative scores separately per condition.
- Returns:
Scores with the same labels and container type as
pvalues.