You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested out the package the other way around, I found a work-around to load an AnnData object in Seurat and did some analyses. Now I want to return with my new and improved Seurat-object to Scanpy.
So I followed the following steps:
SaveH5Seurat(object, filename = "ConvertTest.h5Seurat")
Convert("ConvertTest.h5Seurat", dest = "h5ad")
And it throws the following error when reading in with scanpy==1.4.6:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-977de11dd812> in <module>
----> 1 adata = sc.read_h5ad("../../data/output/embryo_Hb/embryo.test2.h5ad")
~\Anaconda3\envs\UMCU\lib\site-packages\anndata\_io\h5ad.py in read_h5ad(filename, backed, as_sparse, as_sparse_fmt, chunk_size)
427 _clean_uns(d) # backwards compat
428
--> 429 return AnnData(**d)
430
431
~\Anaconda3\envs\UMCU\lib\site-packages\anndata\_core\anndata.py in __init__(self, X, obs, var, uns, obsm, varm, layers, raw, dtype, shape, filename, filemode, asview, obsp, varp, oidx, vidx)
296 varp=varp,
297 filename=filename,
--> 298 filemode=filemode,
299 )
300
~\Anaconda3\envs\UMCU\lib\site-packages\anndata\_core\anndata.py in _init_as_actual(self, X, obs, var, uns, obsm, varm, varp, obsp, raw, layers, dtype, shape, filename, filemode)
495 self._raw = None
496 elif isinstance(raw, cabc.Mapping):
--> 497 self._raw = Raw(self, **raw)
498 else: # is a Raw from another AnnData
499 self._raw = Raw(self, raw._X, raw.var, raw.varm)
~\Anaconda3\envs\UMCU\lib\site-packages\anndata\_core\raw.py in __init__(self, adata, X, var, varm)
29 if adata.isbacked == (X is None):
30 self._X = X
---> 31 self._var = _gen_dataframe(var, self.X.shape[1], ["var_names"])
32 self._varm = AxisArrays(self, 1, varm)
33 elif X is None: # construct from adata
AttributeError: 'dict' object has no attribute 'shape'
There was a bug in early versions of SeuratDisk where an H5AD file generated by SeuratDisk could only be loaded with anndata.read(backed=True); however, more recent versions of SeuratDisk should have fixed this. Could you try again, using the latest version?
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
Hi!
I tested out the package the other way around, I found a work-around to load an AnnData object in Seurat and did some analyses. Now I want to return with my new and improved Seurat-object to Scanpy.
So I followed the following steps:
And it throws the following error when reading in with scanpy==1.4.6:
And I think it has to do with the fact that they changed the file format in AnnData =>0.7
The text was updated successfully, but these errors were encountered: