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 attribute "log_umi" contains NA, NaN, or infinite value #204

Open
Jingyi-only opened this issue Dec 29, 2024 · 3 comments

Comments

@Jingyi-only
Copy link

`library(Seurat)
library(ggplot2)
library(patchwork)
library(dplyr)
library(hdf5r)

data.image = Read10X_Image("/home/bao_jingyi/bjyspace/spatial/",
image.name = "tissue_hires_image.png")
data <- Load10X_Spatial(
data.dir = "/home/bao_jingyi/bjyspace/",
filename = "filtered_feature_bc_matrix.h5",
assay = "Spatial",
slice = "LC-156519-BC-swollen2-edge3-liver5",
image = data.image
)
data
An object of class Seurat
18085 features across 203083 samples within 1 assay
Active assay: Spatial (18085 features, 0 variable features)
1 layer present: counts
1 spatial field of view present: LC.156519.BC.swollen2.edge3.liver5
data<- SCTransform(data, assay = "Spatial", verbose = FALSE)
vst.flavor is set to 'v2' but could not find glmGamPoi installed.
Please install the glmGamPoi package for much faster estimation.


install.packages('BiocManager')
BiocManager::install('glmGamPoi')

Falling back to native (slower) implementation.

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`
1

I have tried a variety of methods but can't solve this error, please give a solution or suggestion to solve this error, thank you.

@Jingyi-only
Copy link
Author

I can't fix the following issues

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

@saketkc
Copy link
Contributor

saketkc commented Dec 29, 2024

Could you rename your Spatial assay to "RNA" and try (for now)?

@Jingyi-only
Copy link
Author

Could you rename your Spatial assay to "RNA" and try (for now)?

Do you mean to change ‘‘assay = "Spatial"’‘ to ’‘assay = "RNA"’‘?

Like this?

data <- Load10X_Spatial(
data.dir = "/home/bao_jingyi/1120space/bjyspace/",
filename = "filtered_feature_bc_matrix.h5",
assay = "RNA",
slice = "LC-156519-BC-swollen2-edge3-liver5",
image = data.image # 假设 data.img 是之前定义的图像对象
)
Warning messages:
1: Adding image data that isn't associated with any assays
2: Adding image data that isn't associated with any assays

If I do this, it looks like my spatial information can't be read. This is like the example of the warning above

I don't know if my understanding is correct, looking forward to your reply again

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