SCTtransform Integration and PCA results object without object$seurat_clusters
1
0
Entering edit mode
3 months ago
aimanbarki ▴ 20

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

SCTransform Integration PCA • 165 views
ADD COMMENT
1
Entering edit mode
3 months ago
aimanbarki ▴ 20

Figured that out. I was missing FindNeighbors() and FindClusters().

ADD COMMENT

Login before adding your answer.

Traffic: 1965 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6