I am running the following code and generating the object with SCTransform and using integrated function. But, When I run PCA it looks like it ran without any error. but the resultant object does not create object$seurat_clusters. So I believe its not saving the cluster information or it is silently failing. Can someone explain where the issue is??
<h6>#################Loading the RDS file</h6>merged_seurat_filtered <- readRDS("Naive_merged_seurat_filtered.rds")
<h6>#</h6>S.list <- SplitObject(merged_seurat_filtered, split.by = 'orig.ident') #SCT normalization for(i in 1:length(S.list)){ S.list[[i]] <- SCTransform(object = S.list[[i]], verbose = TRUE) }
SCT_features <- SelectIntegrationFeatures(object.list = S.list, nfeatures = 3000)
run PrepSCTIntegration to make sure necessary Pearson residuals have been calculated
S.list <- PrepSCTIntegration(object.list = S.list, anchor.features = SCT_features)
SCT_anchors <- FindIntegrationAnchors(object.list = S.list, normalization.method = "SCT", anchor.features = SCT_features)
SCT_integrated <-IntegrateData(anchorset = SCT_anchors , normalization.method = "SCT" )
SCT_integrated[["SCT"]] <- SCT_features
SCT_integrated@assays SCT_integrated <- RunPCA(object = SCT_integrated) SCT_integrated <- RunUMAP(object = SCT_integrated, dims = 1:20) SCT_integrated <- RunTSNE(object = SCT_integrated, dims = 1:20)
Plot
p16 <- DimPlot(SCT_integrated, reduction = "pca", label = TRUE) p16