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 in make_cell_attr(umi, cell_attr, latent_var, batch_var, latent_var_nonreg, : cell attributes cannot contain any NA, NaN, or infinite values #86

Open
connorhknight opened this issue Dec 16, 2020 · 11 comments

Comments

@connorhknight
Copy link

Hi, I am analysing the 4 pancreas samples after applying decontX from the celda package. Some of the samples are processing correctly. However, randomly and inconsistently i receive this error:

Error in make_cell_attr(umi, cell_attr, latent_var, batch_var, latent_var_nonreg, :
cell attributes cannot contain any NA, NaN, or infinite values

Why could this be happening?

@ChristophH
Copy link
Collaborator

ChristophH commented Dec 16, 2020

Do all input cells have at least one count?
Please provide the exact steps to reproduce the problem.

@RajneeshSrivastava
Copy link

Any luck resolving this issue?

@ChristophH
Copy link
Collaborator

sctransform::vst makes some basic assumptions about the input data. The error message mentioned above suggests that either the input umi matrix was not made up of non-negative counts, or there were cells (columns) that did not sum up to a value > 0 (total number of counts <= 0). Please check your input and make sure that those assumptions are met.

@smaniatis
Copy link

I'm getting this on Visium array .h5 output from spaceranger and loaded into Seurat via Load10X_Spatial(). as far as I can see, the counts matrices do not violate the assumptions above. Any advice?

@ChristophH
Copy link
Collaborator

@smaniatis I would need the data to figure out what exactly the problem is. If you share the exact commands you used and the input (.h5 file or counts matrix) I will have a look.

@zhiiiyang
Copy link

zhiiiyang commented Feb 27, 2021

I encountered the same error too but solved it by filtering those genes with all zero counts.

@rocketeer1998
Copy link

I encountered the same error too but solved it by filtering those genes with all zero counts.

I agree. With sample<- subset(sample, subset = nCount_Spatial > 0) command.

@ATpoint
Copy link

ATpoint commented Jul 18, 2022

A reason can be that QC was not done properly and you try to run the function on cells without any counts, meaning all gene in that cell are zero. You can check that with colSums() on your count matrix, removing those with all-zeros.

@troysgit
Copy link

Would it be worthwhile amending the error message to include, "a high % of zeroes in some columns" or similar?

@lucygarner
Copy link

I got this error as well, but I think it was caused by genes that had zero counts rather than cells. Is this possible?

@IoannisKonstantinidis
Copy link

min(obj$nFeature_RNA)
[1] 739
min(obj$nCount_RNA)
[1] 335
max(obj$nFeature_RNA)
[1] 34139
max(obj$nCount_RNA)
[1] 95475
obj <- SCTransform(obj, verbose = FALSE)
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

This seurat object was created from the output of cellranger-arc aggr. It contains both snATAC and snRNA data from 4 biological samples. Any idea why I am getting this error?

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

10 participants