查看后发现,v5版Seurat创建的空间数据的对象,在图像信息和位置信息存储格式中与v4版本并没有差异,利用CreateS1000Object脚本创建的对象也没有问题。 报错的原因是因为SpatialFeaturePlot命令作图时默认调用的是data层下的数据,而v4版本的Seurat在CreateSeuratObject创建对象后,data层就存在,在数据标准化之前,data里存储的是...
anterior1 <- Seurat::CreateSeuratObject(counts = expr.data, project = 'anterior1', assay = 'Spatial') anterior1$slice <- 1 anterior1$region <- 'anterior' # Load the image data img.url <- 'H:\\singlecell\\spaceranger\\V1_Mouse_Brain_Sagittal_Anterio/V1_Mouse_Brain_Sagittal_Anterior...
expr.url<-'H:\\singlecell\\spaceranger\\V1_Mouse_Brain_Sagittal_Anterio/V1_Mouse_Brain_Sagittal_Anterior_filtered_feature_bc_matrix.h5'expr.data<-Seurat::Read10X_h5(filename=expr.url)anterior1<-Seurat::CreateSeuratObject(counts=expr.data,project='anterior1',assay='Spatial')anterior1$slice<...
anterior1 <- Seurat::CreateSeuratObject(counts = expr.data, project = 'anterior1', assay = 'Spatial') anterior1$slice <- 1 anterior1$region <- 'anterior' # Load the image data img.url <- 'H:\\singlecell\\spaceranger\\V1_Mouse_Brain_Sagittal_Anterio/V1_Mouse_Brain_Sagittal_Anterior...
5 anterior1 <- Seurat::CreateSeuratObject(counts = expr.data, project = 'anterior1', assay = 'Spatial') 6 anterior1$slice <- 1 7 anterior1$region <- 'anterior' 8 # Load the image data 9 img.url <- 'H:\\singlecell\\spaceranger\\V1_Mouse_Brain_Sagittal_Anterio/V1_Mouse_Brain...
(filename = expr)mydata <- Seurat::CreateSeuratObject(counts = expr.mydata, project = 'Posterior1', assay = 'Spatial')mydata$slice <- 1mydata$region <- 'Posterior1' #命名# 读取镜像文件imgpath <- "/pubj/ST_test/RNA/Sagittal-Posterior1/spatial"img <- Seurat::Read10X_Image(image....
Formal class 'Seurat' [package "SeuratObject"] with 13 slots ..@ assays :List of 1 .. ..$ Spatial:Formal class 'Assay' [package "SeuratObject"] with 8 slots .. .. .. ..@ counts :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots ...
非Visium空间组测序数据转换为Seurat空转object,方便易用 library(Seurat) seurat_to_spatial <- function(mat,imgx,imgy){ #只要输入三个信息,表达矩阵,x(col),y(row)坐标 spatialObj <- CreateSeuratObject(counts =mat,assay='Spatial') spatialObj$imgx <- as.numeric(imgx) spatialObj$imgy <- as.num...
# Initialize the Seurat object with the raw (non-normalized data). Keep all # genes expressed in >= 3 cells (~0.1% of the data). Keep all cells with at # least 200 detected genes pbmc <- createseuratobject(raw.data="pbmc.data," min.cells="3," min.genes="200,"> ...
# Initialize the Seurat object with the raw (non-normalized data). Keep all # genes expressed in >= 3 cells (~0.1% of the data). Keep all cells with at # least 200 detected genes pbmc <- CreateSeuratObject(raw.data = pbmc.data, min.cells = 3, min.genes = 200, ...