人人都需掌握的单细胞分群聚类分析&Marker基因的可视化 |
您所在的位置:网站首页 › 如何找marker基因 › 人人都需掌握的单细胞分群聚类分析&Marker基因的可视化 |
一年内应该是大家不需要最新版的就是V5版本的SeuratObject 和Seurat,所以都回去吧,回到v4版本哈... 批量转录组测序可以为组织或细胞系的整体基因表达提供信息但无法解析不同细胞间的异质性问题;单细胞测序则可提供每个单个细胞的基因表达特征,允许研究者探索细胞类型、细胞状态、细胞亚群等更细致的分子特征。由于单细胞测序数据具有高度异质性,因此需要特定的数据分析方法来处理和解释数据,如聚类分析、降维算法等。这里意味着单细胞测序分析要比批量转录组的分析更为发杂。 在未成为生信技能树的学徒之前,我从老没有接触过单细胞测序分析,今天有幸和优秀的老师学习,也很庆幸能把我学习到的知识传播给更多的初学者,一起见证我们彼此的成长!好啦,言归正传,今天我们先跟着健明老师学习一下单细胞分群聚类分析&Marker基因的可视化。 以公共数据集GSE182434为例,代码和结果如下: #安装软件 rm(list=ls()) options(stringsAsFactors = F) getwd() library(Seurat) library(ggplot2) #install.packages(c('clustree')) library(clustree) library(cowplot) library(dplyr) library(patchwork)#读入matix数据 library(data.table) dat=fread( "GSE182434_raw_count_matrix.txt.gz",data.table = F) dim(dat) dat[1:4,1:4] rownames(dat)=dat[,1] dat=dat[,-1] dat[1:4,1:4] annotation = fread( "GSE182434_cell_annotation.txt.gz",data.table = F) annotation[1:4,1:4] table(annotation$Patient,annotation$CellType)#筛选相关案例病人样本(DLBCL002 、DLBCL007、 DLBCL008、DLBCL111) #筛选条件①、四个样本 :DLBCL002 、DLBCL007、 DLBCL008、DLBCL111 #筛选条件②、CD8+细胞 sample = c("DLBCL002","DLBCL007","DLBCL008","DLBCL111") CellType = "T cells CD8" annotation = annotation[annotation$Patient %in% sample,] annotation = annotation[annotation$CellType %in% CellType,] dim(annotation) #4个样本,一共5千个CD8细胞 dat = dat[,annotation$ID] dat[1:5,1:5] dim(dat) View(dat) View(annotation)#创建Seurat对象 library(Seurat) sce |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |