I tried to convert SingleCellExperiment to Seurat Object, but it does not work, and keep return error: Error in .subset2(x, i, exact = exact) : subscript out of bounds, how to fix it?

1

I have a SingleCellExperiment Obejct "scp.ref", and I would like to convert it to Seurat Object, I was using the following command:

seurat.ref <- as.Seurat(x = sce.ref, counts = NULL, data = "logcounts")

As you can see in the following output, my SingleCellExperiment object contains only logcounts, there is no raw counts there, so I followed the document of seurat and put counts = NULL, but somehow it still does not work. I'm using R.4.0.5, Seurat 4.0. How to fix the bug?

class: SingleCellExperiment 
dim: 20143 33392 
metadata(0):
assays(1): logcounts
rownames(20143): 0610010F05Rik 1110034G24Rik ... XIST-intron Zfp30
rowData names(0):
colnames(33392): SuHx.PH1.SCR3_TGTCGCGAGATC
  SuHx.PH1.SCR3_GAATTATTCCAT ... SuHx.PH2D2.SCR10_CCGTTGTACGCG
  SuHx.PH2D2.SCR2_TCTCCACATTCG
colData names(4): celllabel condition nFeatures nCounts
reducedDimNames(0):
altExpNames(0):

Errors I have:

Error in .subset2(x, i, exact = exact) : subscript out of bounds


scRNA


Seurat

• 67 views



Source link