Skip to content

Commit 48db793

Browse files
committed
Add more details to the spec
1 parent b7b0a24 commit 48db793

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

docs/source/io/spec.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MuData specification [RFC]
22
==========================
33

4-
Building on top of the `AnnData spec <https://anndata.readthedocs.io/en/latest/fileformat-prose.html>`_, this document provides details on the ``MuData`` on-disk format. For user-facing features, please see `are described here <mudata.rst>`__.
4+
Building on top of the `AnnData spec <https://anndata.readthedocs.io/en/latest/fileformat-prose.html>`_, this document provides details on the ``MuData`` on-disk format. For user-facing features, please see `this document <mudata.rst>`__.
55
::
66
>>> import h5py
77
>>> f = h5py.File("citeseq.h5mu")
@@ -20,8 +20,14 @@ Building on top of the `AnnData spec <https://anndata.readthedocs.io/en/latest/f
2020
.mod
2121
----
2222

23-
Modalities are stored in a ``.mod`` group of the ``.h5mu`` file in the alphabetical order. To preserve the order of the modalities, this is an attribute ``"mod-order"`` that lists the modalities in their respective order. If some modalities are missing from that attribute, the attribute is to be ignored.
23+
Modalities are stored in a ``.mod`` group of the ``.h5mu`` file in the alphabetical order. To preserve the order of the modalities, there is an attribute ``"mod-order"`` that lists the modalities in their respective order. If some modalities are missing from that attribute, the attribute is to be ignored.
2424
::
2525
>>> dict(f["mod-order"])
2626
{'mod-order': array(['rna', 'protein'], dtype=object)}
2727

28+
29+
.obsmap and .varmap
30+
-------------------
31+
32+
While in practice ``MuData`` relies on ``.obs_names`` and ``.var_names`` to collate global observations and variables, it also allows to disambiguate between items with the same name using integer maps. For example, global observations will have non-zero integer values in ``.obsmap["rna"]`` if they are present in the ``"rna"`` modality. If an observation or a variable is missing from a modality, it will correspond to a ``0`` value.
33+

0 commit comments

Comments
 (0)