theislab / moscot

Multi-omic single-cell optimal transport tools
https://moscot-tools.org
BSD 3-Clause "New" or "Revised" License
109 stars 9 forks source link

OT for aligning spatial omics data #53

Closed giovp closed 2 years ago

giovp commented 2 years ago

FGW for spatial omics data:

GP framework for landmark-based registration:

OT for image registration

Marius1311 commented 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.

giovp commented 2 years ago

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.

giovp commented 2 years ago

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

Marius1311 commented 2 years ago

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.