decoupler.mt.consensus#
- decoupler.mt.consensus(result, verbose=False)#
Consensus score across methods.
For each method, enrichment scores are split into positive and negative subsets and transformed independently into z-scores.
Subset values based on sign (direction).
Mirror each subset into positive and negative values with the same magnitude.
Compute z-scores for each subset: .
Restore the original signs to the z-scored values
This transformation ensures comparability across methods while preserving the biological interpretation of activation (positive) and inhibition (negative). The final consensus enrichment score is computed as the mean of these signed z-scores across methods.
Where:
is the number of methods
is the z-score from method .
A two-sided is then calculated from the consensus score using the survival function of the standard normal distribution.
Finally, the obtained are adjusted by Benjamini-Hochberg correction.
- Parameters:
- Return type:
- Returns:
Consensus enrichment scores and p-values.
Example
import decoupler as dc adata, net = dc.ds.toy() dc.mt.decouple(adata, net, tmin=3) dc.mt.consensus(adata)