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 appear when I save the anndata object of scRNA-seq #711

Open
liqingsongplus opened this issue Dec 18, 2024 · 0 comments
Open

Error appear when I save the anndata object of scRNA-seq #711

liqingsongplus opened this issue Dec 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@liqingsongplus
Copy link

My raw anndata object can read and write normally. While after running dynamo flows, error occurs when I save anndata object using the function adata.write_h5ad of scanpy.

The first error is adata.var that Can't implicitly convert non-string objects to strings. But after I adjusted all the columns to strings, I could save them as normal.

The second error is adata.uns, just like follows:

{
"name": "IORegistryError",
"message": "No method registered for writing <class 'collections.OrderedDict'> into <class 'h5py._hl.group.Group'>",
"stack": "---------------------------------------------------------------------------
IORegistryError Traceback (most recent call last)
Cell In [55], line 1
----> 1 adata1.write_h5ad("MP_sub_dynamo.h5ad")

109 write_elem(f, \"varp\", dict(adata.varp), dataset_kwargs=dataset_kwargs)
110 write_elem(f, \"layers\", dict(adata.layers), dataset_kwargs=dataset_kwargs)

--> 111 write_elem(f, "uns", dict(adata.uns), dataset_kwargs=dataset_kwargs)

IORegistryError: No method registered for writing <class 'collections.OrderedDict'> into <class 'h5py._hl.group.Group'>"
}

Have you encountered similar problems?

@liqingsongplus liqingsongplus added the bug Something isn't working label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant