Skip to content

snap.annotate error #6

@mw-neuro

Description

@mw-neuro

Hi, thank you for the amazing resource!

I'm getting the below error that I cannot find a solution for when running the following code:

snap.annotate(
adata,
marker_genes,
group_name="leiden",
layer="scvi_normalized",
)

Any help on how to fix this error would be appreciated!


TypeError Traceback (most recent call last)
Cell In[41], [line 1]
----> [1]snap.annotate(
[2] adata,
[3] marker_genes,
[4] group_name="leiden",
[5] layer="scvi_normalized",
[6] )

File ~/.local/lib/python3.10/site-packages/hnoca/snapseed/annotate.py:113, in annotate(adata, marker_dict, group_name, layer, **kwargs)
93 def annotate(
94 adata: ad.AnnData,
95 marker_dict: dict,
(...)
98 **kwargs
99 ) -> pd.DataFrame:
100 """
101 Annotate clusters based on a manually defined cell type markers.
102
(...)
111 pd.DataFrame with assignments
112 """
--> 113 assignments = annotate_snap(adata, marker_dict, group_name, layer=layer, **kwargs)
114 # Join cluster-level results with adata
...
282 if self._list_type is None:
--> 283 raise TypeError("invalid operation on untyped list")
284 return self._list_type

TypeError: invalid operation on untyped list

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions