decoupler.decouple

decoupler.decouple(mat, net, source='source', target='target', weight='weight', methods=None, args={}, consensus=True, cns_metds=None, min_n=5, verbose=True, use_raw=True, dense=False)

Decouple function.

Runs simultaneously several methods of biological activity inference.

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.

methodslist, str, None

List of methods to run. If none are provided use weighted top performers (mlm, ulm and wsum). To run all methods set to “all”.

argsdict

A dict of argument-dicts.

consensusbool

Boolean whether to run a consensus score between methods.

cns_metdslist

List of estimate names to use for the calculation of the consensus score. If empty it will use all the estimates obtained after running the different methods. If methods is also None, it will use mlm, ulm and norm_wsum instead.

min_nint

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

verbosebool

Whether to show progress.

use_rawbool

If mat is AnnData, use its raw attribute.

densebool

Whether to run methods ignoring zero values per observation. See decoupler.dense_run for more information.

Returns:
resultsdict

Dictionary of activity estimates and p-values. If mat is AnnData, results for each method are stored in .obsm[‘method_estimate’] and if available in .obsm[‘method_pvals’].