1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| ref_sce <- lapply(X = ref_sce, FUN = function(x) { x <- Seurat::SCTransform(x, vst.flavor = "v2", vars.to.regress = c("CC.Difference", "percent.mt", "percent.rp"), verbose = F) }) features <- Seurat::SelectIntegrationFeatures(object.list = ref_sce, assay = rep('SCT', length(ref_sce))) ref_sce <- Seurat::PrepSCTIntegration(object.list = ref_sce, anchor.features = features, assay = rep('SCT', length(ref_sce))) anchors <- Seurat::FindIntegrationAnchors(object.list = ref_sce, normalization.method = "SCT", anchor.features = features, assay = rep('SCT', length(ref_sce))) combined <- Seurat::IntegrateData(anchorset = anchors, normalization.method = "SCT") combined <- Seurat::RunPCA(combined, verbose = FALSE) combined <- Seurat::RunUMAP(combined, reduction = "pca", dims = 1:30, verbose = FALSE) Seurat::DimPlot(combined, reduction = "umap", group.by = "cell_type_fig3", repel = T, label = T)
|