Hi
I have three single cell RNA seurat object to integrate. Each one is separated rds file. Actually I didn't find how to deal with this situation cause the tutorial load the processed data.
So my analysis steps were like below:
file.list <- c('sample1.rds', 'sample2.rds', 'sample3.rds')
obj.list <- list()
for (i in 1:length(file.list)) {
obj <- readRDS(file.list[[i]])
obj.list[[i]] <- obj
}
obj5.merge <- merge(obj.list[[1]], c(obj.list[[2]], obj.list[[3]]), add.cell.ids = c('sample1', 'sample2', 'sample3'))
But at the split process, the first error occured:
> obj5.merge[["RNA"]] <- split(obj5.merge[["RNA"]], f = obj5.merge$orig.ident)
Error in `.local()`:
! The following layers are already split: ‘counts.sample1’,
• ‘counts.sample2’, ‘counts.sample3’ Please join before splitting
Run `rlang::last_trace()` to see where the error occurred.
And I saw that the obj5.merge@assay$RNA@layers had been split to three:
And then I just go ahead to normalize, reduction and IntegratedLayers, the second error occured:
> obj5.integrated <- IntegrateLayers(object = obj5.merge,
method = CCAIntegration,
orig.reduction = "pca",
new.reduction = "integrated.cca",
verbose = FALSE)
| | 0 % ~calculating Error in UseMethod(generic = "Assays", object = object) :
no applicable method for 'Assays' applied to an object of class "NULL"
I noticed that the layer name of mine seems to be different to ifnb data:
> obj5.merge
An object of class Seurat
41602 features across 16293 samples within 2 assays
Active assay: SCT (19712 features, 3000 variable features)
3 layers present: counts, data, scale.data
1 other assay present: RNA
2 dimensional reductions calculated: pca, umap.unintegrated
Does someone know the reason of the two errors in my scripts? Is there any tutorial suit for my situation?
As a complement, I think it may be related with SCT. The layer before SCTransform is "3 layers present: counts.sample1, counts.sample2, counts.sample3", and after is "3 layers present: counts, data, scale.data".
Hi I have three single cell RNA seurat object to integrate. Each one is separated rds file. Actually I didn't find how to deal with this situation cause the tutorial load the processed data. So my analysis steps were like below:
But at the
split
process, the first error occured:And I saw that the
obj5.merge@assay$RNA@layers
had been split to three:And then I just go ahead to normalize, reduction and
IntegratedLayers
, the second error occured:I noticed that the layer name of mine seems to be different to ifnb data:
Does someone know the reason of the two errors in my scripts? Is there any tutorial suit for my situation?
Thanks