How to create a layer over a subset of .obs or .vars?

I’m using the MultiVI framework for multiomic data which defines modality as a column in adata.var. However, I need to track certain modality-specific transformations in the same multimodal anndata object. But the API states that layers have shape like anndata.X, which wont work. What is the workaround for this?

Hey, @mkarikom!

Similarly to this recent question, it sounds exactly like MuData.

2 Likes