PROGENy--单细胞通路活性评分

文摘   2024-11-05 21:32   江苏  


写在开头

今天我们分享的任务是来自:生物学功能注释三板斧。 本次任务我计划分为四个部分来写,今天写第二部分。

正文部分

相较于其他通路活性评估算法,使用 PROGENy 能够构建通路核心基因集及基因的贡献权重,对通路活性评估更加准确有效;同时 PROGENy 能够精确定位癌症或病变中发生关键变化的通路节点,可以为生物学研究提供更加准确可靠的结果。


作者主要着眼于癌症中10种信号通路,如下c

加载R包和数据


# Only needed for data handling and plottinglibrary(dplyr)library(tibble)library(tidyr)library(patchwork)library(ggplot2)library(pheatmap)
library(Seurat)
#https://saezlab.github.io/progeny/#:~:text=PROGENy%20is%20resource%20that%20leverages%20a%20large%20compendium,infer%20pathway%20activities%20from%20bulk%20or%20single-cell%20transcriptomics.#https://cloud.tencent.com/developer/article/2206142
#https://saezlab.github.io/decoupleR/articles/decoupleR.htmllibrary(progeny)library(Seurat)#https://saezlab.github.io/decoupleR/articles/pw_sc.html

#BiocManager::install("OmnipathR")library(decoupleR)

#单细胞progeny-----#https://cloud.tencent.com/developer/article/2206142 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" Mousepbmc@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), #"inferno" "magma" "cividis" "viridis"                        #  breaks = progenyBreaks,                        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.htmlhttps://www.jianshu.com/p/4058050d546ehttps://saezlab.github.io/progeny/articles/progeny.html



生信小博士
【生物信息学】R语言开始,学习生信。Seurat,单细胞测序,空间转录组。 Python,scanpy,cell2location。资料分享
 最新文章