scRNA-seq yield many molecular readouts that are hard to interpret by themselves. One way of summarizing this information is by inferring pathway activities from prior knowledge.

In this notebook we showcase how to use decoupleR for pathway activity inference with a down-sampled PBMCs 10X data-set. The data consists of 160 PBMCs from a Healthy Donor. The original data is freely available from 10x Genomics here from this webpage.

1 Loading packages

First, we need to load the relevant packages, Seurat to handle scRNA-seq data and decoupleR to use statistical methods.

## We load the required packages
library(Seurat)
library(decoupleR)

# Only needed for data handling and plotting
library(dplyr)
library(tibble)
library(tidyr)
library(patchwork)
library(ggplot2)
library(pheatmap)

2 Loading the data-set

Here we used a down-sampled version of the data used in the Seurat vignette. We can open the data like this:

inputs_dir <- system.file("extdata", package = "decoupleR")
data <- readRDS(file.path(inputs_dir, "sc_data.rds"))

We can observe that we have different cell types:

DimPlot(data, reduction = "umap", label = TRUE, pt.size = 0.5) + NoLegend()

2.0.1 PROGENy model

PROGENy is a comprehensive resource containing a curated collection of pathways and their target genes, with weights for each interaction. For this example we will use the human weights (other organisms are available) and we will use the top 500 responsive genes ranked by p-value. Here is a brief description of each pathway:

  • Androgen: involved in the growth and development of the male reproductive organs.
  • EGFR: regulates growth, survival, migration, apoptosis, proliferation, and differentiation in mammalian cells
  • Estrogen: promotes the growth and development of the female reproductive organs.
  • Hypoxia: promotes angiogenesis and metabolic reprogramming when O2 levels are low.
  • JAK-STAT: involved in immunity, cell division, cell death, and tumor formation.
  • MAPK: integrates external signals and promotes cell growth and proliferation.
  • NFkB: regulates immune response, cytokine production and cell survival.
  • p53: regulates cell cycle, apoptosis, DNA repair and tumor suppression.
  • PI3K: promotes growth and proliferation.
  • TGFb: involved in development, homeostasis, and repair of most tissues.
  • TNFa: mediates haematopoiesis, immune surveillance, tumour regression and protection from infection.
  • Trail: induces apoptosis.
  • VEGF: mediates angiogenesis, vascular permeability, and cell migration.
  • WNT: regulates organ morphogenesis during development and tissue repair.

To access it we can use decoupleR:

net <- get_progeny(organism = 'human', top = 500)
net
#> # A tibble: 7,000 × 4
#>    source   target  weight  p_value
#>    <chr>    <chr>    <dbl>    <dbl>
#>  1 Androgen TMPRSS2  11.5  2.38e-47
#>  2 Androgen NKX3-1   10.6  2.21e-44
#>  3 Androgen MBOAT2   10.5  4.63e-44
#>  4 Androgen KLK2     10.2  1.94e-40
#>  5 Androgen SARG     11.4  2.79e-40
#>  6 Androgen SLC38A4   7.36 1.25e-39
#>  7 Androgen MTMR9     6.13 2.53e-38
#>  8 Androgen ZBTB16   10.6  1.57e-36
#>  9 Androgen KCNN2     9.47 7.71e-36
#> 10 Androgen OPRK1    -5.63 1.11e-35
#> # ℹ 6,990 more rows

3 Activity inference with Multivariate Linear Model (MLM)

To infer pathway enrichment scores we will run the Multivariate Linear Model (mlm) method. For each sample in our dataset (mat), it fits a linear model that predicts the observed gene expression based on all pathways’ Pathway-Gene interactions weights. Once fitted, the obtained t-values of the slopes are the scores. If it is positive, we interpret that the pathway is active and if it is negative we interpret that it is inactive.