have difficulty with IntegrateLayers() #9759
Unanswered
SouvietPenguinStarfleet
asked this question in
Q&A
Replies: 1 comment
-
|
I don't know anything about this, but read in several places about the importance of setting the normalization.method = "SCT" in IntegrateLayers. Maybe try that? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
##so i got a scRNA dataset called obj, a Seurat list consist of 6 Seurat objects, first merged them into one combined Seurat object
obj_combined <- merge(obj[[1]], y = obj[-1], add.cell.ids = c("M_f", "M_m", "P_f", "P_m", "T_f", "T_m"), project = "obj")
obj_combined <- SCTransform(obj_combined, vars.to.regress ="percent.mt", method = "glmGamPoi", vst.flavor = "v2", verbose = FALSE)
##the following steps mainly take reference from https://satijalab.org/seurat/articles/seurat5_integration
obj_combined <- RunPCA(obj_combined, npcs=100, verbose = FALSE)
obj_combined <- FindNeighbors(obj_combined, dims = 1:40, reduction = "pca")
obj_combined <- FindClusters(obj_combined, resolution = 2, cluster.name = "unintegrated_clusters")
obj_combined <- RunUMAP(obj_combined, dims = 1:40, reduction = "pca", reduction.name = "umap.unintegrated")
pdf(file="unintegrated.pdf", width=6, height=6)
DimPlot(obj_combined, reduction = "umap.unintegrated", group.by = "order")
dev.off()
##and these are all good, after that i want to run IntegrateLayers(), and had the Error report
| | 0 % ~calculating Error in UseMethod(generic = "Assays", object = object) :
no applicable method for 'Assays' applied to an object of class "NULL"
##so i checked my variable features and they're all right, then checked whether my RNA Assay and SCT Assay are v5 and split into groups, turns out RNA Assay is v5 and already split, SCT Assay is v3 so i run this line to change it into v5
obj_combined[["SCT"]] <- as(obj_combined[["SCT"]], "Assay5")
##and i tried to split SCT with the following line
obj_combined[["SCT"]] <- split(obj_combined[["SCT"]], f = obj_combined$order)
#$order is already defined in my object, "M""P""T"
##Error reporting
Splitting ‘counts.M’, ‘counts.P’, ‘counts.T’, ‘data.M’, ‘data.P’, ‘data.T’ layers. Not splitting ‘scale.data.M’, ‘scale.data.P’, ‘scale.data.T’.
##and after that i ran cuz i want to use cca to do some integration analysis but
obj_combined.CCA <- IntegrateLayers(object = obj_combined, method = CCAIntegration, orig.reduction = "pca", new.reduction = "integrated.cca", verbose = FALSE)
##Error in
IntegrateLayers():! None of the features provided are found in this assay
Run
rlang::last_trace()to see where the error occurred.What should i do to solve the error now :(
Beta Was this translation helpful? Give feedback.
All reactions