Skip to content

Introduce explicit syntax to detach backed modalities #192

Description

@gtca

If a modality has been backed inside .h5mu, on copy/write operations we might want to have a clearly defined behaviour. In particular the proposal is to differentiate between modalities linked to the MuData object and modalities detached from it:

mdata = mu.read('rna_atac.h5mu', backed=True)

rna = mdata['rna']
#          ^__ linked
rna.copy('rna.h5ad')
# => Error referring the user to the MuData object

rna = mdata.mod['rna']
#          ^__ detached
rna.copy('rna.h5ad')
# => Success

This proposal has been brought forward by @ilia-kats and has been originally discussed in the issue scverse/muon#17.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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