dviraran / SingleR

SingleR: Single-cell RNA-seq cell types Recognition (legacy version)
GNU General Public License v3.0
263 stars 98 forks source link

Merge Seurat objects error #89

Open kyriakosschwarz opened 5 years ago

kyriakosschwarz commented 5 years ago

When Seurat objects are created through CreateSinglerSeuratObject() and I try to merge them (according to: https://satijalab.org/seurat/v3.0/merge_vignette.html) I get the following error:

> trial <- merge(s109$seurat, y = c(s736$seurat), 
+                                add.cell.ids = c("s109", "s736"), project = "merged")
Error in RowMergeMatrices(mat1 = mat1, mat2 = mat2, mat1_rownames = mat1.names,  : 
  Expecting a string vector: [type=NULL; required=STRSXP].

However, when I create Seurat object through CreateSeuratObject() this error does not show up and it works fine. Is there a way to merge Seurat object created through CreateSinglerSeuratObject() ?

dviraran commented 5 years ago

Hi,

My only guess could be because in CreateSinglerSeuratObject when using reduce.seurat.object==T then counts and the scaled data are removed from the object to make the object smaller (much smaller). Try using FALSE for this parameter and see if it works.

Best, Dvir