decoupler.run_udt

decoupler.run_udt(mat, net, source='source', target='target', weight='weight', min_leaf=5, min_n=5, seed=42, verbose=False, use_raw=True)

Univariate Decision Tree (UDT).

UDT fits a single regression decision tree for each sample and regulator, where the observed molecular readouts in mat are the response variable and the regulator weights in net are the explanatory one. Target features with no associated weight are set to zero. The obtained feature importance from the fitted model is the activity (udt_estimate) of a given regulator.

Parameters:
matlist, DataFrame or AnnData

List of [features, matrix], dataframe (samples x features) or an AnnData instance.

netDataFrame

Network in long format.

sourcestr

Column name in net with source nodes.

targetstr

Column name in net with target nodes.

weightstr

Column name in net with weights.

min_leafint

The minimum number of samples required to be at a leaf node.

min_nint

Minimum of targets per source. If less, sources are removed.

seedint

Random seed to use.

verbosebool

Whether to show progress.

use_rawbool

Use raw attribute of mat if present.

Returns:
estimateDataFrame

UDT scores. Stored in .obsm[‘udt_estimate’] if mat is AnnData.

pvalsDataFrame

Obtained p-values. Stored in .obsm[‘udt_pvals’] if mat is AnnData.