theislab / ehrapy

Electronic Health Record Analysis with Python.
https://ehrapy.readthedocs.io/
Apache License 2.0
235 stars 19 forks source link

Validating encoded-ness state of AnnData object #815

Open eroell opened 3 weeks ago

eroell commented 3 weeks ago

Description of feature

This is not an ideal way of checking whether the adata has been encoded:

https://github.com/theislab/ehrapy/blob/3260f8f72bd8ab8ba39540e11b938250a846efd1/ehrapy/anndata/anndata_ext.py#L325

as we do not guarantee that ep.pp.encode will enforce this typing of the array.

Think about whether to

The latter option might be more clean, and could be considered a subissue of consistent use with infer feature type and