decoupler.pp.bin_order#

decoupler.pp.bin_order(adata, order, names=None, label=None, nbins=100)#

Bins 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 in adata.obs to consider for ordering.

names str | list (default: None)

Name of features to bin.

label str | None (default: None)

The name of the column in adata.obs to consider for coloring the grouping. By default None.

nbins int (default: 100)

Number of bins to use.

Return type:

DataFrame

Returns:

DataFrame with sources binned alng a continous ordered proess.

Example

import decoupler as dc

adata, net = dc.ds.toy(pstime=True)
dc.pp.bin_order(adata, names=["G01", "G02", "G03"], order="pstime")