satijalab / seurat

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

Integration with RPCA + SCTransform - reference reduction not present #9017

Open lizchcase opened 2 weeks ago

lizchcase commented 2 weeks ago

I am trying to use RPCA to integrate two datasets normalized with SCTransform, as is shown in this vingette. The code that I'm running is below:

dataset.list <- c(dataset1,dataset2)
dataset.list <- lapply(X = dataset.list, FUN = SCTransform, method = "glmGamPoi")
features <- SelectIntegrationFeatures(object.list = dataset.list, nfeatures = 3000)
dataset.list <- PrepSCTIntegration(object.list = dataset.list, anchor.features = features)
dataset.list <- lapply(X = dataset.list, FUN = RunPCA, features = features)

anchors <- FindIntegrationAnchors(object.list = dataset.list, 
                                         normalization.method = "SCT",
                                         anchor.features = features, 
                                         dims = 1:50, 
                                         reduction = "rpca", 
                                         k.anchor = 20)

I got stopped at FindIntegrationAnchors with the following error:

Normalizing query using reference SCT model
Error: reference.reduction (rpca) is not present in the provided reference object.
Execution halted

I'm not sure why the reduction is not present as I'm running PCA on each dataset individually before trying to find anchors. As far as I'm aware, RPCA is not its own reduction. Any help would be much appreciated, thanks!

zskylarli commented 1 week ago

Hi - thank you for reporting this issue! Since we cannot reproduce this error, would it be possible for you to provide a minimal reproducible example that demonstrates the issue using one of the datasets available through SeuratData, or send an example object that fails with this code to sli@nygenome.org? Thank you!