第一步:从GEO数据库下载.h5文件
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM3892578
第二步:Rstudio加载包,读入数据
library(Seurat)
library(ggplot2)
library(cowplot)
library(Matrix)
library(dplyr)
library(ggsci)
library(scater)
library(SingleR)
library(hdf5r)
###用read10x_h5函数读取数据
Read10X_h5(GSM3892578_SKIN_HV1_F2_filtered_gene_bc_matrices_h5.h5)
Error in Read10X_h5(GSM3892578_SKIN_HV1_F2_filtered_gene_bc_matrices_h5.h5) : Please install hdf5r to read HDF5 files ###显示要安装包
install.packages('hdf5r')
library(hdf5r)
h1= Read10X_h5(GSM3892578_SKIN_HV1_F2_filtered_gene_bc_matrices_h5.h5)
#再用creatseuratobject函数创建seurat对象就可以了
HC_1 <- CreateSeuratObject(counts = hc1, project = "HC_1", min.cells = 3, min.features = 200)
HC1就是一个seurat对象啦,再开启下游分析。