[Question] Why doesn't cisTopicObject inherit from AnnData?
I'm looking through the code and documentation for the cisTopicObject, and it seems very similar to the concept of an AnnData object.
Why not just inherit from AnnData directly and add some constraints so you can use it for your package-specific functionality? This would make it easier to use your package with the scverse suite of tools, rather than needing to figure out how to go from an AnnData to cisTopicObject (which I can't seem to find documentation on).
Advantages:
- Makes the package more accessible
- This would encourage you to adopt the convention of cells (observations) on the rows, and features (regions) on the columns, which is the standard convention in numpy/pandas/sklearn, but you've transposed here.
- Don't need to write your own save functions
- Adds ability to subset data
Hi @dburkhardt
Thank you for the suggestion. We are already working on this, see: https://github.com/aertslab/pycisTopic/blob/mudata/pycisTopic/_io/object_convert.py
Best,
Seppe
I guess this is maybe asking too much, but I think the issue is a little bit deeper. You might want to consider changing your underlying data model to be more compatible with the scverse packages if you want winder adoption.
It's nice to have functions to convert out, but I worry that you're making work harder by creating entirely new classes for data. Many of these issues have already been solved in AnnData / MuData.
Hi @dburkhardt
Thank you for the feedback. You're correct. The plan is indeed to convert internal functions to use AnnData/MuData instead. Unfortunately this will take some time :).
Best,
Seppe