seurat
seurat copied to clipboard
Error object 'log_umi' not found when reference.SCT.model is set
Hi,
When using a reference.SCT.model
on a relatively larger data, where SCT will have to broke into several blocks, the following error occurs:
Getting residuals for block 1(of 2) for 5705STDY8058280 dataset
Error in eval(predvars, data, env) : object 'log_umi' not found
Thanks @z5ouyang - Can you share your code so that I can try to reproduce? thanks!
Thanks for the reply. The error only happens for the data where the "block" is needed. The testing code below:
require(Seurat) #Seurat_5.0.3
require(SeuratData)
pbmc <- CreateSeuratObject(counts = Read10X(data.dir = "filtered_gene_bc_matrices/hg19/"),
project = "pbmc3k", min.cells = 3, min.features = 200)
pbmc <- SCTransform(pbmc,return.only.var.genes = FALSE)
ifnb <- LoadData("ifnb")
ifnb <- SCTransform(ifnb,vst.flavor="v2",
reference.SCT.model=pbmc@[email protected][[1]])
with error:
Running SCTransform on assay: RNA
Running SCTransform on layer: counts
Using reference SCTModel to calculate pearson residuals
Determine variable features
Setting min_variance based on median UMI: 0.04
Calculating residuals of type pearson for 3000 genes
|======================================================================| 100%
|======================================================================| 100%
Getting residuals for block 1(of 3) for counts dataset
Error in eval(predvars, data, env) : object 'log_umi' not found