Skip to content

latest anndata version 0.12 does not allow forward slashes in column names or keys in uns

In proportion analysis notebook we save a dictionary with keys as cluster/celltype in .uns and I got an Error when saving the anndata as .h5ad :

ValueError: Forward slashes are not allowed in keys. Error raised while writing key 'vSM/PC' of <class 'h5py._hl.group.Group'> to /uns/scanpro/significance

Apparently it's not allowed to have forward slashes / in keys in .uns or in .obs/.var column names.