Closed sinkahak closed 1 year ago
Thank you for trying SIMBA! Would you mind sharing with me two subsets of these two anndata objects so that I can replicate the errors? This will make it easier for me to offer assistance.
Hi,
thank you for getting back to me and apologies for my delayed response!
I added you as a collaborator to my repository sc-GRN where you can find the subsets of atac and motifs anndata objects.
Thank you for providing the data. Unfortunately I am having trouble reading the two h5ad
files. Below are the errors I encountered while attempting to read them:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~/anaconda3/envs/env_simba/lib/python3.9/site-packages/anndata/_io/utils.py in func_wrapper(elem, *args, **kwargs)
176 try:
--> 177 return func(elem, *args, **kwargs)
178 except Exception as e:
~/anaconda3/envs/env_simba/lib/python3.9/site-packages/anndata/_io/h5ad.py in read_group(group)
526 if encoding_type:
--> 527 EncodingVersions[encoding_type].check(
528 group.name, group.attrs["encoding-version"]
~/anaconda3/envs/env_simba/lib/python3.9/enum.py in __getitem__(cls, name)
431 def __getitem__(cls, name):
--> 432 return cls._member_map_[name]
433
KeyError: 'dict'
During handling of the above exception, another exception occurred:
AnnDataReadError Traceback (most recent call last)
/tmp/ipykernel_49249/2258671287.py in <module>
----> 1 adata_PM = si.read_h5ad('./motifs-subset-pp-forSimba.h5ad')
2 adata_PM
~/anaconda3/envs/env_simba/lib/python3.9/site-packages/anndata/_io/h5ad.py in read_h5ad(filename, backed, as_sparse, as_sparse_fmt, chunk_size)
419 d[k] = read_dataframe(f[k])
420 else: # Base case
--> 421 d[k] = read_attribute(f[k])
422
423 d["raw"] = _read_raw(f, as_sparse, rdasp)
~/anaconda3/envs/env_simba/lib/python3.9/functools.py in wrapper(*args, **kw)
875 '1 positional argument')
876
--> 877 return dispatch(args[0].__class__)(*args, **kw)
878
879 funcname = getattr(func, '__name__', 'singledispatch function')
~/anaconda3/envs/env_simba/lib/python3.9/site-packages/anndata/_io/utils.py in func_wrapper(elem, *args, **kwargs)
181 else:
182 parent = _get_parent(elem)
--> 183 raise AnnDataReadError(
184 f"Above error raised while reading key {elem.name!r} of "
185 f"type {type(elem)} from {parent}."
AnnDataReadError: Above error raised while reading key '/layers' of type <class 'h5py._hl.group.Group'> from /.
Hi,
that's odd, it works fine for me. Could it be due to different versions of anndata, I am using v0.9.1 and ad.read_h5ad to read the files:
motif = ad.read_h5ad(workdir + "motifs-subset-pp-forSimba.h5ad")
atac = ad.read_h5ad(workdir + "atac-subset-pp-forSimba.h5ad")
I was able to solve this issue on my own after all. My motif.var_names were not unique, which was causing the error.
Hi,
thanks for developing this interesting tool!
I am having problems generating the peak-to-motif graph. The cell~peak graph generates just fine but I get the following info when adding list_PM:
My objects look like this prior generating the graph:
And session info:
I just can't wrap my brain around what could be the issue here. I tried to limit my atac object with the top PCs (14131 × 179364) but didn't get rid of the error. Do you know what could be causing this? Any help would be very much appreciated.
Best, Sini