theislab / zellkonverter

Conversion between scRNA-seq objects
https://theislab.github.io/zellkonverter/
Other
145 stars 27 forks source link

Make sure metadata is converted to dict for anndata v0.7.5 #40

Closed lazappi closed 3 years ago

lazappi commented 3 years ago

Depending on whether a list is named or not reticulate converts it to either a Python list or a Python dict. For anndata v0.7.4 which we are currently using this doesn't matter but for v0.7.5 having a list in the uns slot is an issue.

To avoid this need name any unnamed items in uns_list (with a message) and convert it to a dict using reticulate::dict(). This should then be store in adata$uns rather than adata$uns$data as we do now.