Cluster2-metadata: dict with key-value pairs in labelset objects (minus the name - which gets merged into the key. Note that this appears to work with the Python AnnData library, but is not legal according to the AnnData spec, which only allows literals as values. We may need to convert to JSON in future.
Also note, the implementation in example files from CAP is different. All metadata is dumped into one object, keyed on labelset(cellannotation_set) name.
Flattening to obs is working except that there should be no
cellannotation_setname-cell-label key
it should just be
e.g.
NOT
https://github.com/cellannotation/cell-annotation-schema/blob/main/docs/cap_anndata_schema.md#cellannotation_setname
Flattening to
uns
needs some work.For labelsets:
The CAP anndata spec has:
https://github.com/cellannotation/cell-annotation-schema/blob/main/docs/cap_anndata_schema.md#cellannotation_metadata
i.e., each labelset gets its own
uns
keyCluster2-metadata: dict with key-value pairs in labelset objects (minus the name - which gets merged into the key. Note that this appears to work with the Python AnnData library, but is not legal according to the AnnData spec, which only allows literals as values. We may need to convert to JSON in future.
Also note, the implementation in example files from CAP is different. All metadata is dumped into one object, keyed on labelset(cellannotation_set) name.
For now - follow spec precisely, not example.