E413 Supporting multiple `layers`, `X`, `obsm` etc. · Issue #91 · scverse/annbatch · GitHub
[go: up one dir, main page]

Skip to content

Supporting multiple layers, X, obsm etc. #91

@ilan-gold

Description

@ilan-gold

Description of feature

This question came up in #90

Right now, the loader supports one label column and one "data" object. How can we support multiple "data" objects (see #49 for the label column part)?

I can see two routes:

  1. Inspect the incoming AnnData object to the loader and load whatever is found within that is aligned along obs (i.e., any obsm, layers, X etc.)
ds = ZarrSparseDataset(
        batch_size=4096,
        chunk_size=32,
        preload_nchunks=512,
).add_anndata(my_anndata_with_layers_and_obsm)
next(iter(ds)) # return object contains both `obsm` and `layers`
  1. Expose a RNG argument so two loaders can use RNGs seeded identically. This approach would force the user to create two objects, but would grossly simplify our internal code. I lean towards this because we can always create new APIs that compose two ZarrSparseDataset objects, for example, and handle this internally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0