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

An error when reading the data #195

Open
HelloWorldLTY opened this issue Nov 9, 2024 · 3 comments
Open

An error when reading the data #195

HelloWorldLTY opened this issue Nov 9, 2024 · 3 comments

Comments

@HelloWorldLTY
Copy link

Hi, I intend to convert a h5ad file to seurat data. The code is:

library(anndataR)

adata <- read_h5ad("./adata_net_cells.h5ad", to = "Seurat")

The bug is:

Warning message in .toseurat_check_obsvar_names(obj$obs_names, "obs_names"):
“'obs_names' cannot have underscores ('_') when converting to Seurat,
replacing with dashes ('-')”
Warning message in Matrix::sparseMatrix(j = indices, p = indptr, x = data, dims = shape, :
“NAs introduced by coercion to integer range”
Warning message in value[3L]:
“Error reading element 'X' of type 'csr_matrix':
'p' must be a nondecreasing vector c(0, ...)”

And my current adata$X is null. I used the up-to-date version of anndataR. Thanks a lot.

@lazappi
Copy link
Collaborator

lazappi commented Nov 11, 2024

We are currently updating the Seurat conversion but it's still a work in progress #183. If you are up for testing this more you could try using the branch from the PR. It would also be helpful if you could supply a test file for this issue (a small subset of the data that causes the error would be great).

@rcannood
Copy link
Collaborator

Hey Tianyu!

Indeed; the updated Seurat converter should be merged soon.

Could you install anndataR from this branch to see if that solves your issue?

install.packages("remotes")
remotes::install_github("scverse/anndataR@new_seurat")

Let me know whether the new approach works better for you.

@rcannood
Copy link
Collaborator

#183 has been merged, so you can now also try installing the latest version of anndataR to see whether it solves your problem.

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

3 participants