单细胞seurat数据的基础知识
rm(list = ls())
library(Seurat)
#注意这个报错
#Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
folders=list.files('./',pattern='[123]$')
folders
scList = lapply(folders,function(folder){ CreateSeuratObject(counts = Read10X(folder), project = folder,min.cells = 3, min.features = 200)
})BM <- merge(scList[[1]], y = c(scList[[2]],scList[[3]]), add.cell.ids = c("BM1","BM2","BM3"), project = "BM")
BM
GM <- merge(scList[[4]], y = c(scList[[5]],scList[[6]]), add.cell.ids = c("GM1","GM2","GM3"), project = "GM")
GM##两部分数据进行读取合并str(BM)#查看数据格式BM[['RNA']]
参考:
1:跟着Cell学单细胞转录组分析(二):单细胞转录组测序文件的读入及Seurat对象构建_add.cell.ids-CSDN博客
2:第二讲 数据读取_哔哩哔哩_bilibili
3:为什么要以数据库的思维来理解单细胞数据 - 简书 (jianshu.com)
4:了解Seurat对象 - 生物信息云 (bioinfocloud.github.io)
数据:GSE164241 GEO Accession viewer (nih.gov)