decoupler.pp.prune#
- decoupler.pp.prune(features, net, tmin=5, verbose=False)#
Removes sources of a
netwith less thantmintargets shared withmat.- Parameters:
net (
DataFrame) – Dataframe in long format. Must includesourceandtargetcolumns, and optionally aweightcolumn.tmin (
int(default:5)) – Minimum number of targets per source. Sources with fewer targets will be removed.verbose (
bool(default:False)) – Whether to display progress messages and additional execution details.
- Return type:
- Returns:
Filtered net in long format.
Example
import decoupler as dc adata, net = dc.ds.toy() X, obs_names, var_names = dc.pp.extract(adata) dc.pp.prune(var_names, net, tmin=3)