decoupler.tl.rankby_order#
- decoupler.tl.rankby_order(adata, order, stat='dcor', verbose=False, **kwargs)#
Rank features along a continuous, ordered process such as pseudotime.
- Parameters:
adata (
AnnData) – Annotated data matrix with observations (rows) and features (columns).order (
str) – The name of the column inadata.obsto consider for ordering.stat (
str(default:'dcor')) –Which statistic to compute. Must be one of these:
dcor(distance correlation fromdcor.independence.distance_correlation_t_test)pearsonr(Pearson’s R fromscipy.stats.pearsonr)spearmanr(Spearman’s R fromscipy.stats.spearmanr)kendalltau(Kendall’s Tau fromscipy.stats.kendalltau)
verbose (
bool(default:False)) – Whether to display progress messages and additional execution details.kwargs – Key arguments passed to the selected
statfunction.
- Return type:
- Returns:
DataFrame with features associated with the ordering variable.
Example
import decoupler as dc adata, net = dc.ds.toy(pstime=True) dc.tl.rankby_order(adata, order="pstime", names=["G01", "G02", "G03"])