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: make_cell_attr - log_umi contains NA, NaN, or infinite value in SCTransform #200

Open
unikill066 opened this issue Nov 6, 2024 · 1 comment

Comments

@unikill066
Copy link

Encountered an error while running SCTransform on a Xenium object created with LoadXenium. The error indicates that the log_umi cell attribute contains NA, NaN, or infinite values, which is preventing SCTransform from completing successfully.

Error:

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

Code:

> library(Seurat)
> library(future)
> plan("multisession", workers = 10)
> library(ggplot2)
> library(tidyverse)
> library(arrow)
> library(dplyr)
> library(devtools)

> data.dir <- "/path/to/xenium/data/outs"

> xenium.obj <- LoadXenium(data.dir, fov = "fov", assay = "Xenium")
10X data contains more than one type and is being returned as a list containing matrices of each type.
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')

> xenium.obj <- SCTransform(xenium.obj, assay = "Xenium", clip.range = c(-10, 10))
Calculating cell attributes from input UMI matrix: log_umi
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

Please advise if there are specific pre-processing steps required for Xenium data or any known solutions to handle NA, NaN, or infinite values in log_umi.

@saketkc
Copy link
Contributor

saketkc commented Nov 7, 2024

Do you have genes with zero counts in your data?

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