API

Import decoupler as:

import decoupler as dc

Preprocessing:

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).

get_net_mat(net)

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

Methods:

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

AUCell.

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_mlm(mat, net[, source, target, weight, ...])

Multivariate Linear Model (MLM).

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

Over Representation Analysis (ORA).

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).

run_consensus(res)

Consensus.

Running multiple methods:

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

Decouple function.

Utils:

show_methods()

Shows available methods.

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

Checks the correlation across the regulators in a network.

melt(df)

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.

assign_groups(summary)

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, ...[, method])

Computes simple contrast between two conditions from pseudo-bulk profiles.

Omnipath wrappers:

show_resources()

Shows available resources in Omnipath.

get_resource(name)

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.

Plotting

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

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