既然是不对劲,说明它并不是10X单细胞技术的h5格式表达量矩阵文件,所以不能是简简单单是Read10X_h5读取。 仅仅是因为后缀名字都是h5,就被忽悠了。我简单检索了一下,CellRanger will also produce a molecule information file (molecule_info.h5) that contains… well, information about the transcript molecules....
(x) a=Read10X_h5( x ) a[1:4,1:4] library(stringr) (p=str_split(x,'_',simplify = T)[,2]) sce <- CreateSeuratObject( a ,project = p ) sce }) setwd('../') pro='integrated' # 如果是 28个10X的单细胞转录组样品,走下面的流程会很勉强 for (i in 1:length(sceList)) {...
options(stringsAsFactors =F)library(Seurat)# H5文件读入和转化为Seurat对象# https://nbisweden.github.io/workshop-scRNAseq/labs/compiled/seurat/seurat_01_qc.htmlsetwd('GSE146981_RAW/') fs=list.files(pattern ='.h5') fs lapply(fs,function(x){ x=fs[1] print(x) a=Read10X_h5( x ) a[1...
function(x){x=fs[1]print(x)a=Read10X_h5(x)a[1:4,1:4]library(stringr)(p=str_split(x,'_',simplify=T)[,2])sce<-CreateSeuratObject(a,project=p)sce})setwd('../')
This might be a bit of a rant, and I'm aware there are some good arguments for the way things are... but I just wasted 4 hours of my life because I wasn't aware of the default gex_only=True in sc.read_10x_h5(). Just wanted to flag that if scanpy support for multimodality ...
I am getting the following error while reading a .h5 file. Error in sparseMatrix(i = indices[] + 1, p = indptr[], x = as.numeric(x = counts[]), : 'p' must be a nondecreasing vector c(0, ...) In addition: Warning message: In sparseMatrix(...
a=Read10X_h5( x ) a[1:4,1:4] library(stringr) (p=str_split(x,'_',simplify =T)[,2]) sce <- CreateSeuratObject( a ,project = p ) sce }) setwd('../') pro='integrated' # 如果是 28个10X的单细胞转录组样品,走下面的流程会很勉强 ...