Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jan 19, 2023

Conversation

bkmartinjr
Copy link
Member

@bkmartinjr bkmartinjr commented Jan 19, 2023

Context: single-cell-data/TileDB-SOMA#755 and chanzuckerberg/cellxgene-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

# even if we added our own above.
if column_names is not None:
arrow_table = arrow_table.select(column_names)
# Drop soma_joinid column if we added it soley for use in filling
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Drop soma_joinid column if we added it soley for use in filling
# Drop soma_joinid column if we added it solely for use in filling

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops! fixed

@johnkerl johnkerl changed the title fix issue TileDB-SOMA#755 [python] Fix inconsistent handling of column_names in ExperimentAxisQuery.to_anndata Jan 19, 2023
@bkmartinjr bkmartinjr merged commit 6b09af0 into main Jan 19, 2023
@bkmartinjr bkmartinjr deleted the bkmartinjr/755-query-colnames branch January 19, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[python] Handling of column_names is inconsistent in ExperimentAxisQuery.to_anndata
3 participants