clip_a.mov
Paste 3 (Paste + Paste 2) is a Python package and NAPARI plugin that provides advanced alignment methods of Spatial Transcriptonomics (ST) data as detailed in the following publications:
Zeira, R., Land, M., Strzalkowski, A., et al. Alignment and integration of spatial transcriptomics data. Nat Methods, 19, 567–575 (2022).
Read the publication
Original PASTE code
Liu X, Zeira R, Raphael BJ.
Partial alignment of multislice spatially resolved transcriptomics data.
Genome Res. 2023 Jul; 33(7):1124-1132.
Read the publication
Original PASTE2 code
The motivation behind PASTE3 is to provide a NAPARI plugin
for practitioners to experiment with both PASTE and PASTE2 at an operational
level, as well as provide a common codebase for future development of ST
alignment algorithms. (Paste-N
..)
PASTE3 is built on pytorch
and can leverage a GPU for performance if
available, though it is able to run just fine in the absence of a GPU, on all
major platforms.
Auto-generated documentation for the PASTE3 package is available here.
Additional examples and the code to reproduce the original PASTE paper's analyses are available here. Preprocessed datasets used in the paper can be found on zenodo.
The PASTE series of algorithms provide computational methods that leverage both gene expression similarity and spatial distances between spots to align and integrate spatial transcriptomics data. In particular, there are two modes of operation:
Pairwise-Alignment
: align spots between successive pairs of slices.Center-Alignment
: infer acenter slice
(low sparsity, low variance) and align all slices with respect to this center slice.
The easiest way is to install PASTE3 is using pip
:
pip install git+https://github.com/raphael-group/paste3.git
Developers who wish to work with paste3
in Python will likely want to review
the detailed installation
page.
If you intend to use PASTE3 as a napari
plugin, install paste3
in a python
environment that has napari
installed, or install napari
after having
installed paste3
as above.
pip install napari
Open one of the sample datasets we provide (File->Open Sample->Paste3->SCC Patient..
)
and then select one of the two modes of PASTE3 operations
(Plugins->Paste3->Center Align
or Plugins->Paste3->Pairwise Align
).
Your own datasets can be used if they're in the .h5ad format, with each file denoting a single slice. With the default parameters, alignment should take a couple of minutes, though you have the option of changing these to suit your needs.
If you intend to use PASTE3 programmatically in your Python code, follow along the Getting Started tutorial.