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

[python] Fix inconsistent handling of column_names in ExperimentAxisQuery.to_anndata #89

Closed bkmartinjr closed 1 year ago

bkmartinjr commented 1 year ago

Context: single-cell-data/TileDB-SOMA#755 and chanzuckerberg/cell-census#56

This PR modifies the ExperimentAxisQuery.to_anndata() to return columns consistent with other API, i.e., returned obs/var columns will be the union of columns explicitly requested via column_names parameter, and columns referenced in the AxisQuery value_filter.

Fixes single-cell-data/TileDB-SOMA#755

See unit test in single-cell-data/TileDB-SOMA#763