decoupler.pp.prune#
- decoupler.pp.prune(features, net, tmin=5, verbose=False)#
Removes sources of a
netwith less thantmintargets shared withmat.- Parameters:
- features
ndarray|None Column names of
mat.- net
DataFrame Dataframe in long format. Must include
sourceandtargetcolumns, 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.
- features
- 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)