satijalab / seurat-wrappers

Community-provided extensions to Seurat
GNU General Public License v3.0
300 stars 129 forks source link

About merging multiple RNA velocity Seurat object #20

Closed MoLuLuMo closed 4 years ago

MoLuLuMo commented 5 years ago

Hi, I am trying to merge several Seurat objects includes RNA velocity, and here is the error:

Error in GetAssay.Seurat(object = object, assay = assay) : RNA is not an assay present in the given object. Available assays are: spliced, unspliced, ambiguous, SCT

How should I fix it ?

saeedfc commented 4 years ago

If I understand correctly,

spliced assay is the same as RNA assay.

object.n[["RNA"]] <- CreateAssayObject(counts = GetAssayData(object.n, assay= "spliced", slot = "counts"))

After running this, you can try merging again.

merged.object <- merge(object.1, c(object.2, object.3, object.4), merge.data = TRUE)