-
Notifications
You must be signed in to change notification settings - Fork 62
Description
related to #64 and https://github.com/kevinyamauchi/ome-ngff-tables-prototype , as discussed this morning with @kevinyamauchi this is a description of adata slots and how they are used in https://github.com/theislab/squidpy and other spatial analysis tools of the https://github.com/theislab/scanpy ecosystem.
adata.Xandadata.layers["layer"]store molecular info (gene/protein expression etc.).adata.obsmstores various "latent" representations of obs (e.g. PCA/UMAP coordinates) but also:adata.obsm["spatial"]stores obs coordinates in space, with shape(N,2)or(N,3).adata.obsm["molecule_spatial"]will store molecule location in FISH-based data (with awkward arrays).
adata.varmno real use in spatial data afaikadata.obspstores adjacency matrices of e.g. graphs in spatial coordinates, knn graphs in latent spaces etc.adata.varpno real use in spatial data afaikadata.unsstores a bunch of image-related data. It is structured as follow:adata.uns["spatial"]containslibrary_idkeys that correspond to unique identifiers of images (e.g. tissue slides). These values are also stored inadata.obs["library_ids"]which can be used to subset anndata based on the tissue slide of interest. Furthermore, insideadata.uns["spatial"][<library_id>]there are 2 more dictionaries:imagesfor small-size tissue images (order of Mbs)scalefactorsmetadata related to scaling original coordinates inadata.obs["spatial"]as well as other infos
adata.uns also stores intermediate analysis results by several analysis tools in the ecosystem. e.g. trajectory analysis, velocity, various plotting params etc. I would therefore consider to support it for a better integration in the ecosystem.
It would also be ok to store the same type of info in metadata in ngff, and then handle this on the API side (it'd be fine for us at Squidpy, not so sure for others).
@kevinyamauchi next week I'll try out https://github.com/kevinyamauchi/ome-ngff-tables-prototype and report back, thanks again for sharing.
Just want to mention one more time that this is super exciting and am really looking forward to see how it develops!
pinging various people @ivirshup @michalk8 @hspitzer @AnnaChristina @LucaMarconato