Skip to contents

This function enables in-silico gene expression perturbation analysis using a co-expression network. It applies primary perturbations to hub genes, propagates the signal throughout the co-expression network, and computes cell-cell transition probabilities.

Usage

ModulePerturbation(
  seurat_obj,
  mod,
  perturb_dir,
  perturbation_name,
  graph,
  group.by = NULL,
  group_name = NULL,
  n_hubs = 5,
  n_iters = 3,
  expand_module = 0,
  delta_scale = 0.2,
  corr_sigma = 0.05,
  n_threads = 4,
  use_velocyto = TRUE,
  use_graph_tp = FALSE,
  use_counts_tp = FALSE,
  layer = "counts",
  slot = "counts",
  assay = "RNA",
  wgcna_name = NULL
)

Arguments

seurat_obj

A Seurat object containing the gene expression and co-expression data.

mod

Name of the co-expression module to perturb.

perturb_dir

A numeric value determining the type of perturbation to apply:

  • negative for knock-down,

  • positive for knock-in,

  • 0 for knock-out.

perturbation_name

A string representing the name of the in-silico perturbation. This will be stored as a new assay in the Seurat object.

graph

Name of the cell-cell graph in Graphs(seurat_obj), used for transition probability calculations.

group.by

Optional. A string specifying the column in seurat_obj@meta.data used for cell grouping.

group_name

Optional. A string or vector specifying the group(s) within group.by to use for perturbation. If NULL, perturbation is applied to all cells.

n_hubs

Number of hub genes to perturb in the selected co-expression module. Default is 5.

n_iters

Number of iterations for propagating the perturbation signal through the network. Default is 3.

delta_scale

A numeric scaling factor controlling the influence of the propagated perturbation. Default is 0.2.

corr_sigma

A numeric scaling factor for adjusting the correlation matrix during transition probability calculations. Default is 0.05.

n_threads

Number of threads to use for parallel computation during correlation calculations. Default is 4.

use_velocyto

Logical. If TRUE, leverages velocyto.R functions for transition probabilities. Default is TRUE.

use_graph_tp

Logical. If TRUE, transition probabilities are computed using the cell-cell graph specified in graph. Default is FALSE.

layer

Layer in the assay used for the perturbation. Default is 'counts'.

slot

Slot to extract data for aggregation (e.g., "counts", "data", or "scale.data"). Default is 'counts'.

assay

Name of the assay in seurat_obj containing the expression data. Default is 'RNA'.

wgcna_name

Optional. Name of the hdWGCNA experiment in seurat_obj@misc. If NULL, defaults to the active WGCNA experiment.

Value

A Seurat object containing the in-silico perturbation results as a new assay.

Details

Following co-expression network analysis with hdWGCNA, ModulePerturbation allows us to perform in-silico gene expression perturbation analysis. This analysis consists of several key steps.

  1. Apply a primary perturbation to the hub genes of a selected module. In this step, we model the observed gene expression of the hub genes using a zero-inflated negative binomial (ZINB), or other distributions. We then simulate new exptession data by sampling this distribution. The simulated expression matrix is then multiplied by the perturb_dir, and the final perturbation expression matrix is computed by adding the observed and simulated expression matrices.

  2. Apply a secondary perturbation to the rest of the co-expression module using a signal propagation algorithm. Given the gene-gene co-expression network from hdWGCNA, we can propagate the perturbation signal throughout the network by computing the dot product between the network adjacency matrix and the perturbation expression matrix. This can be performed over several iterations using n_iters.

  3. Compute the cell-cell transition probabilities.