single-cell-data / SOMA

A flexible and extensible API for annotated 2D matrix data stored in multiple underlying formats.
MIT License
70 stars 9 forks source link

Drop unused categories in `ExperimentAxisQuery.to_anndata` #204

Closed nguyenv closed 1 month ago

nguyenv commented 1 month ago

Issue: https://github.com/single-cell-data/TileDB-SOMA/issues/2765

Changes: ExperimentAxisQuery.to_anndata iterates through each column and drops unused categories.

Notes for Reviewer: This change was originally proposed in https://github.com/single-cell-data/TileDB-SOMA/pull/2811 but was suggested somacore was a more appropriate location for it.

nguyenv commented 1 month ago

As placeholder I have chosen drop_levels but will change to the agreed upon name.