decoupleR 2.10.0
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.
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)
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()
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:
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
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.