scirpy
scirpy copied to clipboard
Consistent typing in adata.obs
- Most columns added to
adata.obsshould probably be well-defined categoricals - Booleans should be booleans / or categoricals, and not strings
-
nanshould benanand not"nan". Categoricals do supportnan, but there was an issue with how this is implemented inanndata, maybe this needs to be fixed upstream.
Anndata supports now categoricals with nan values.
There are still some issues with anndata saving booleans. Also anndata can't save object dtypes, so we need to make sure to convert those to categoricals appropriately.
Anndata now also supports nullable booleans: https://github.com/theislab/anndata/issues/504#issuecomment-1010352216
Nullable strings are still not supported (https://github.com/theislab/anndata/issues/679), but less important since categoricals are better in almost all cases anyway.
superseded by #327