Closed nigiord closed 4 months ago
Hi! I tried to debug your object, and it seems like because there are exactly 10001 cells, the last single cell is being put into a separate third block when calculating residuals, since the number of subsampled cells used to build the nonbinomial regression is set to 5000 by default. If you just set the ncells
argument to another number, i.e. 3000, this should be fixed. Let me know if you have additional questions!
Seurat::SCTransform(seuratobj, vst.flavor = "v2", vars.to.regress = "percent.mt", min_cells = 5, verbose = TRUE, ncells=3000)
@zskylarli I see, that’s really a nasty corner case. Thank you for your help! I would suggest adding a simple test such as:
colnames(seuratobj) %% ncells >= min_cells
to save other users from the really confusing error message (hopefully they should end up here if they google it though).
Cheers,
I have the following Seurat object (v5)
that I simply try to normalize using the following command
but after computing everything, it fails at the end with:
I only have this issue with this particular object (it's one sample among dozens, after multiple filtering of barcodes). The issue is reproducible on multiple platform (HPC cluster, locally on linux, locally on osx-64). I tried to update Matrix, Seurat and SeuratObject with no effect. I think there might be something wrong with my object but I'm unsure what, it was build in my pipeline the same way then all the others. Googling the error did not help much, and I tried diving into Seurat and sctransform code base but no clue so far.
The object is only 50 MB so I created a link at the end of this issue to download it.
Extra information
Complete log:
sessionInfo()
Reproducible example
Download the Rds object [49.3 MB] here and run:
Any help would be greatly appreciated!
Cheers, −Nils