Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error object 'log_umi' not found when reference.SCT.model is set #8793

Open
z5ouyang opened this issue Apr 19, 2024 · 2 comments
Open

Error object 'log_umi' not found when reference.SCT.model is set #8793

z5ouyang opened this issue Apr 19, 2024 · 2 comments

Comments

@z5ouyang
Copy link

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
@saketkc saketkc transferred this issue from satijalab/sctransform Apr 19, 2024
@saketkc
Copy link
Collaborator

saketkc commented Apr 20, 2024

Thanks @z5ouyang - Can you share your code so that I can try to reproduce? thanks!

@z5ouyang
Copy link
Author

z5ouyang commented Apr 22, 2024

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@assays$SCT@SCTModel.list[[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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants