Open BenjaminDEMAILLE opened 1 year ago
This likely means that saving failed - an issue with anndata rather than cell2location. Check errors/log from your saving script.
Hi, @vitkl
When I load the c2l h5ad by sc.read_h5ad
, I got same error:
KeyError: 'Unable to synchronously open object (message type not found)' Error raised while reading key '/varm/means_per_cluster_mu_fg' of <class 'h5py._hl.group.Group'> to /
But saving looks ok
Try examining adata.varm['means_per_cluster_mu_fg'] before saving to make sure that there are no issues. I suspect this error is due to non-allowed characters in column names (allowed by pandas, not allowed by h5py). Column names are cell clusters names so you probably need to rename some of your cell types to avoid these characters (likely / + etc).
Try examining adata.varm['means_per_cluster_mu_fg'] before saving to make sure that there are no issues. I suspect this error is due to non-allowed characters in column names (allowed by pandas, not allowed by h5py). Column names are cell clusters names so you probably need to rename some of your cell types to avoid these characters (likely / + etc).
thanks, you are right, "/" is an illegal col name for h5py, but "+" is ok.
Hi ! I got an error when trying to read the Visium h5ad after cell2location
my script is :
And reading the h5ad after like :
I got :
How can I solve this ?