Import decoupler as:

import decoupler as dc


extract(mat[, use_raw, verbose, dtype])

Processes different input types so that they can be used downstream.

filt_min_n(c, net[, min_n])

Removes sources of a net with less than min_n targets.

match(c, r, net)

Matches mat with a regulatory adjacency matrix.

rename_net(net[, source, target, weight])

Renames input network to match decoupler's format (source, target, weight).


Transforms a given network to a regulatory adjacency matrix (targets x sources).


run_aucell(mat, net[, source, target, n_up, ...])


run_gsea(mat, net[, source, target, times, ...])

Gene Set Enrichment Analysis (GSEA).

run_gsva(mat, net[, source, target, kcdf, ...])

Gene Set Variation Analysis (GSVA).

run_mdt(mat, net[, source, target, weight, ...])

Multivariate Decision Tree (MDT).

run_mlm(mat, net[, source, target, weight, ...])

Multivariate Linear Model (MLM).

run_ora(mat, net[, source, target, n_up, ...])

Over Representation Analysis (ORA).

run_udt(mat, net[, source, target, weight, ...])

Univariate Decision Tree (UDT).

run_ulm(mat, net[, source, target, weight, ...])

Univariate Linear Model (ULM).

run_viper(mat, net[, source, target, ...])

Virtual Inference of Protein-activity by Enriched Regulon (VIPER).

run_wmean(mat, net[, source, target, ...])

Weighted sum (WMEAN).

run_wsum(mat, net[, source, target, weight, ...])

Weighted sum (WSUM).



Running multiple methods:

decouple(mat, net[, source, target, weight, ...])

Decouple function.



Shows available methods.

check_corr(net[, source, target, weight, ...])

Checks the correlation across the regulators in a network.


Function to generate a long format dataframe similar to the one obtained in the R implementation of decoupler.

get_acts(adata, obsm_key)

Extracts activities as AnnData object.

get_toy_data([n_samples, seed])

Generate a toy mat and net for testing.

summarize_acts(acts, groupby[, obs, var, ...])

Summarizes activities obtained per group by their mean or median and removes features that do not change across samples.


Assigns group labels based on summary activities.

get_pseudobulk(adata, sample_col, groups_col)

Generates an unormalized pseudo-bulk profile per sample and group.

get_contrast(adata, group_col, ...[, ...])

Computes Differential Expression Analysis using scanpy's rank_genes_groups function between two conditions from pseudo-bulk profiles.

get_top_targets(logFCs, pvals, name, ...[, ...])

Return significant target features for a given source and contrast.

format_contrast_results(logFCs, pvals)

Formats the results from get_contrast into a long format data-frame.

Omnipath wrappers:


Shows available resources in Omnipath.


Wrapper to access resources inside Omnipath.

get_progeny([organism, top])

Pathway RespOnsive GENes for activity inference (PROGENy).

get_dorothea([organism, levels, weight_dict])

DoRothEA gene regulatory network.


plot_volcano(logFCs, pvals, name, contrast, net)

Plot logFC and p-values of a selected source by a specific contrast.