-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Handle reading empty H5AD slots #86
Comments
Can you post a minimal reproducible example? ;) |
e.g. when reading in a file with only a .X:
|
Hi! Thanks for this great tool first of all.
Then in R:
As mentioned in the python code, a quick fix is to just add the var and obs indices as columns. |
@lazappi @LouiseDck The original issue still persists: import anndata as ad
ad.AnnData().write_h5ad("nothing.h5ad") library(anndataR)
read_h5ad("nothing.h5ad")
# Error in `[[.H5File`(file, name) :
# An object with name X does not exist in this group I'll try to resolve this issue asap, since it will likely be relatively easy to solve. @kollo97 Thanks for reporting this issue. However, it seems to be unrelated to the original issue. Which version of R and the dependencies you have installed are you using? I believe you are likely using an older version of hdf5r, since the code you provided works on my end: library(anndataR)
se1 <- read_h5ad("no_var_no_obs.h5ad", to = "Seurat") # works
# Loading required namespace: SeuratObject
se2 <- read_h5ad("var_obs.h5ad", to = "Seurat") # works
se3 <- read_h5ad("no_var_no_obs.h5ad") # works
se3 <- se3$to_Seurat() # works If the problem still persists, please create a separate issue. |
Hi @rcannood, thanks so much for looking into this so quickly!! |
@kollo97 Fantastic 👍 @ lazappi and LouiseDck In the meantime, the original issue has also been resolved: import anndata as ad
ad.AnnData().write_h5ad("nothing.h5ad") library(anndataR)
read_h5ad("nothing.h5ad")
# AnnData object with n_obs × n_vars = 0 × 0 |
Reading currently fails if a slot is not set in the
.h5ad
fileThe text was updated successfully, but these errors were encountered: