写在开头
今天我们分享的任务是来自:生物学功能注释三板斧。 本次任务我计划分为四个部分来写,今天写第二部分。
2.PROGENy--单细胞通路活性评分
3.DoRothEA--转录组转录因子评分
4.PROGENy--转录组通路活性评分
正文部分
相较于其他通路活性评估算法,使用 PROGENy 能够构建通路核心基因集及基因的贡献权重,对通路活性评估更加准确有效;同时 PROGENy 能够精确定位癌症或病变中发生关键变化的通路节点,可以为生物学研究提供更加准确可靠的结果。
作者主要着眼于癌症中10种信号通路,如下c
加载R包和数据
library(dplyr)
library(tibble)
library(tidyr)
library(patchwork)
library(ggplot2)
library(pheatmap)
library(Seurat)
library(progeny)
library(Seurat)
library(decoupleR)
getwd()
dir.create("~/gzh/20240414_progeny_通路活性分析")
setwd("~/gzh/20240414_progeny_通路活性分析")
getwd()
load("~/gzh/pbmc3k_final_v4.rds")
table(Idents(pbmc))
pbmc单细胞数据:
计算通路活性
# We create a data frame with the specification of the cells that belong to
## each cluster to match with the Progeny scores.
CellsClusters <- data.frame(Cell = names(Idents(pbmc)),
CellType = as.character(Idents(pbmc)),
stringsAsFactors = FALSE)
head(CellsClusters)
DimPlot(pbmc, reduction = "umap", label = TRUE, pt.size = 0.5) + NoLegend()
2 #2-------
## We compute the Progeny activity scores and add them to our Seurat object
## as a new assay called Progeny.
pbmc <- progeny(pbmc, scale=FALSE, organism="Human", top=500, perm=1, return_assay = TRUE) #"Human" Mouse
pbmc@assays$progeny
pbmc@assays$progeny %>%dim()
pbmc@assays$progeny@data[,1:19]
# Assay data with 14 features for 2638 cells # First 10 features:
# Androgen, EGFR, Estrogen, Hypoxia, JAK-STAT, MAPK, NFkB, p53, PI3K, TGFb
计算得到通路活性矩阵:
后续的可视化分析又是各显神通了!
对通路活性矩阵进行可视化一
library(viridis)
progeny_hmap = pheatmap(t(summarized_progeny_scores_df),
fontsize=12,
fontsize_row = 10, color=myColor,
breaks = progenyBreaks, main = "PROGENy",
angle_col = 45, treeheight_col = 0, border_color = NA)
progeny_hmap = pheatmap(t(summarized_progeny_scores_df),
fontsize=12,
fontsize_row = 10, color=turbo(90),
main = "PROGENy",
angle_col =90, treeheight_col = 0, border_color = NA)
可视化二
library(viridis)
DefaultAssay(pbmc) <- 'progeny'
p1= FeaturePlot(pbmc,features = "NFkB", coord.fixed = T,label = TRUE,
order = T, cols = viridis(10))
p2=FeaturePlot(pbmc,features = "MAPK", coord.fixed = T, order = T, cols = viridis::turbo(10))
p1|p2
参考:
https://saezlab.github.io/progeny/articles/ProgenySingleCell.html
https://www.jianshu.com/p/4058050d546e
https://saezlab.github.io/progeny/articles/progeny.html