Closed giovp closed 2 years ago
Thanks @giovp! OTT recently refectored their code base a bit so @michalk8 is happy we didn't construct the interface yet. What are the next steps here? @michalk8, you mentioned pseudocode would be nice, for an anticipated application? In our meeting, I gathered we are currently learning towards FGW for NovoSpaRc-like spatial imputation for starters.
I'll look into the data, come up with sensible API, and report back. I see the point of prioritizing novosparc but would def try out to have a registration tool PoC as well, might be relatively straightforward extension.
So if we agree on initially just supporting approach 1 (iterative alignemnt), then api could be very straightforward:
import moscot as mt
adata # adata with multiple slides across adata.obs["batch"]
mt.align(adata, inplace=True)
# or alternative if a list of adata is passed
mt.align([adata1, adata2, adata3])
there is an important thing to add which is the procrustes analysis (for getting the actual aligned coordinates). This is very easy to implement and I can take care of it. See here: https://github.com/raphael-group/paste/blob/5c40d36969172d83efc660ffb642c29c9f4036da/src/paste/visualization.py#L120
We'd have to decide if/where to save the couplings in anndata as well but I guess you are already working towards a general solution with moscot.
then we would do the plotting with squidpy (as soon as I get this merged: https://github.com/theislab/squidpy/pull/437
pinging @MUCDK for reference
I think we can close this - an overview of the 2 spatial applications (space <-> X and space <-> space) is in this gdoc, together with references to the related literature @giovp also listed above.
FGW for spatial omics data:
GP framework for landmark-based registration:
paper: https://www.biorxiv.org/content/10.1101/2021.11.11.468178v1?rss=1
code: https://github.com/almaan/eggplant
poster from LMRL 2021: https://drive.google.com/file/d/1SN1krSgfmm4NZZ9rPxDas0LPpRdtJv2S/view
OT for image registration