satijalab / sctransform

R package for modeling single cell UMI expression data using regularized negative binomial regression
GNU General Public License v3.0
203 stars 33 forks source link

Error in make_cell_attr(umi, cell_attr, latent_var, batch_var, latent_var_nonreg, : cell attribute "log_umi" contains NA, NaN, or infinite value #146

Closed LooLipin closed 1 year ago

LooLipin commented 1 year ago

Hi there,

This is a follow up to my comment on https://github.com/satijalab/sctransform/issues/131#issuecomment-1236497165

I was able to successfully run 7 of my 8 visium samples by following the vignette on https://satijalab.org/seurat/archive/v3.2/spatial_vignette.html

Unfortunately, one failed at the scTransform stage with Error in make_cell_attr(umi, cell_attr, latent_var, batch_var, latent_var_nonreg, : cell attribute "log_umi" contains NA, NaN, or infinite value

I tried to upload my object but it is slightly over the limit. Can you please provide me with an email to forward?

Thanks, Lipin

saketkc commented 1 year ago

You can email me at schoudhary@nygenome.org

saketkc commented 1 year ago

One of your cell has no UMIs:

> min(obj$nCount_Spatial)
0

You can filter the cell out:

obj <- subset(obj, nCount_Spatial>0)

and then run SCTransform:

obj <- SCTransform(obj, assay="Spatial", vst.flavor="v2")