专栏名称: 生信漫漫学
好好学习,让知识进入脑子!
今天看啥  ›  专栏  ›  生信漫漫学

GSEA与GSVA分析

生信漫漫学  · 公众号  ·  · 2024-10-03 09:30
    

文章预览

单细胞测序—标准分析流程(4)—GSEA与GSVA 这部分代码是我综合了好几篇帖子手打的代码 主要参考的是单细胞绘图之GSEA & GSVA 再调用GSVA函数出问题时主要参考: https://github.com/rcastelo/GSVA/issues/172 GSEA和GSVA,再也不用去下载gmt文件咯 1 GSEA 接着单细胞测序—标准流程代码(3)—marker 基因富集分析_差异基因,继续分析 gesa_gsva_bymyself.R rm(list=ls()) options(stringsAsFactors =  F )  source ( 'scRNA_scripts/lib.R' ) library (clusterProfiler) library (enrichplot) getwd() d= 'gesa_gsva_bymyself/' dir.create(d) setwd(d)  # 数据导入 sce = readRDS( '../2-harmony/sce.all_int.rds' ) load( '../phe.Rdata' ) sce$celltype=phe$celltype sce$group=sce$stim table(sce$celltype,sce$group ) ######## GSEA ##### table(sce@meta.data$celltype) cells_sub  < - subset(sce@meta.data,celltype % in % c( "CD4 Naive T" ))  scRNA_sub  < - subset(sce,cells = row.names(cells_sub)) #logfc.threshold ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照
总结与预览地址:访问总结与预览