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

Curators and Data Consumers want Discover API to return AnnData elements from a dataset #7402

Open
brianraymor opened this issue Dec 18, 2024 · 0 comments
Assignees
Labels
curator request Improvements requested by curators discover api Work related to the Discover API product dp Data Platform workstream

Comments

@brianraymor
Copy link

brianraymor commented Dec 18, 2024

Context

@jahilton has asked for obs and var elements to be returned.

See scenario from @emdann :

I often use census to analyse tables of cell- and sample-level metadata before downloading h5ads, to decide whether I want to include or exclude a dataset or subset of cells from analysis. Often info in the author metadata informs that decision, but right now I can only access it by downloading the whole h5ad for a dataset. It would be great to be able to browse the column names of the author metadata for a certain dataset_id, or even better to download the full adata.obs for a dataset_id without downloading all the count matrices.

Also see @jahilton comment.


This code fragment using anndata.experimental which has been previously shared:


import h5py
import fsspec
from anndata.experimental import read_elem
# or from anndata.io import read_elem for 0.11

fs = fsspec.filesystem('s3', anon=True)

with h5py.File(
    fs.open("cellxgene-census-public-us-west-2/cell-census/2024-07-01/h5ads/0041b9c3-6a49-4bf7-8514-9bc7190067a7.h5ad")
) as f:
    obs = read_elem(f["obs"])
@brianraymor brianraymor added curator request Improvements requested by curators discover api Work related to the Discover API product dp Data Platform workstream labels Dec 18, 2024
@brianraymor brianraymor self-assigned this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
curator request Improvements requested by curators discover api Work related to the Discover API product dp Data Platform workstream
Projects
None yet
Development

No branches or pull requests

1 participant