muon
muon copied to clipboard
Introduce explicit syntax to detach backed modalities
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 #17.