satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.24k stars 902 forks source link

Unable to write run FastMNN integration after SCTransform in the Seurat 5 Integration vignette #8448

Open chungsai opened 7 months ago

chungsai commented 7 months ago

Using the exact code from the module https://satijalab.org/seurat/articles/seurat5_integration,

Using the exact libraries, but replaced the first steps with the code in the bottom for SCTransform

obj <- SCTransform(obj) obj <- RunPCA(obj, npcs= 30, verbose = FALSE) obj <- RunUMAP(obj, dims = 1:30, verbose = FALSE, reduction.name = "umap.unintegrated") obj <- FindNeighbors(obj, dims = 1:30, verbose = FALSE, reduction = "pca") obj <- FindClusters(obj, resolution =2, verbose = FALSE, cluster.name = "unintegrated_clusters")

Then.

obj <- IntegrateLayers( object = obj, method = CCAIntegration, normalization.method = "SCT", new.reduction = "integrated.cca", verbose = F )

obj <- IntegrateLayers( object = obj, method = RPCAIntegration, normalization.method = "SCT", new.reduction = "integrated.rpca", verbose = F )

obj <- IntegrateLayers( object = obj, method = HarmonyIntegration, normalization.method = "SCT", new.reduction = "Harmony", verbose = F )

obj <- IntegrateLayers( object = obj, method = FastMNNIntegration, normalization.method = "SCT", new.reduction = "integrated.mnn", verbose = F )

Integration works well until FastMNN. It gives me the error

Screenshot 2024-02-08 at 9 54 20 PM

It seems like a bug similar to this was known before?

https://github.com/satijalab/seurat/issues/5329

I tried the FastMNN code edit by user yuanlizhanshi before. However, it made no difference.

I am wondering if anyone has resolved this issue.

Thanks,

Tommy0398 commented 3 months ago

Hi @chungsai,

I'm having the same issue but with my own data. Did you ever find a fix for it?

KR