satijalab / sctransform

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

Error in make_cell_attr(umi, cell_attr, latent_var, batch_var, latent_var_nonreg, : count matrix must have row and column names #186

Closed Sunnyxia040103 closed 8 months ago

Sunnyxia040103 commented 8 months ago

Hi, I'm using R studio but this line keeps popping up: Error in make_cell_attr(umi, cell_attr, latent_var, batch_var, latent_var_nonreg, : count matrix must have row and column names Any ideas on how to solve this issue? Many thanks!!! Below are my full codes. image image

saketkc commented 8 months ago

What are thr rownames and colnames of your exp object?

Sunnyxia040103 commented 8 months ago

It's an expression matrix and looks like this image

saketkc commented 8 months ago

They do not contain gene names or cell names. Any particular reason why you want to run vst() instead of running SCTransform()? In any case, you will need to format your counts matrix so that the rownames are genes and colnames are cells.