Overview
Description
Exploratory spatial data analysis (ESDA) can be a powerful approach to understanding single-cell genomics datasets, but it is not yet part of standard data analysis workflows. In particular, geospatial analyses, which have been developed and refined for decades, have yet to be fully adapted and applied to spatial single-cell analysis. We introduce the Voyager
platform, which systematically brings the geospatial ESDA tradition to (spatial) -omics, with local, bivariate, and multivariate spatial methods not yet commonly applied to spatial -omics, united by a uniform user interface. Using Voyager
, we showcase biological insights that can be derived with its methods, such as biologically relevant negative spatial autocorrelation. Underlying Voyager
is the SpatialFeatureExperiment
(SFE) data structure, which combines Simple Feature with SingleCellExperiment
and AnnData
to represent and operate on geometries bundled with gene expression data. Voyager has comprehensive tutorials demonstrating ESDA built on GitHub Actions to ensure reproducibility and scalability, using data from popular commercial technologies. Voyager is implemented in both R/Bioconductor and Python/PyPI, and features compatibility tests to ensure that both implementations return consistent results.
This workshop focuses on new features of SFE and Voyager implemented in the past year. Earlier features are described in more details this preprint and in the 2023 Voyager workshop. The preprint will soon be updated to include the new functionalities prior to submission. The new features fall under these areas:
- Expanded support for images. A new image class
BioFormatsImage
has been implemented to support OME-TIFF from Xenium andExtImage
class to support image processing with theEBImage
package. - Support for transcript spot geometries. Coordinates from smFISH-based technologies are reformatted for faster reading next time, and is stored in the
rowGeometries
field of the SFE object. As simple features, geometric operations fromsf
can be applied. - Support for images and transcript spots led to improved functions to read output from commercial technologies: Vizgen MERFISH, Xenium, CosMX. We’re working on VisiumHD.
- Expanded support for affine transformations. Affine transformation can be performed with a transformation matrix, and all images and geometries are transformed while remaining aligned.
- New spatial operations on SFE objects: spatial aggregation (cell and transcript spot levels) and splitting by geometries.
Pre-requisites
To understand the workshop material, you are expected to have:
- Intermediate knowledge of R syntax
- At least basic familiarity with Tidyverse and
ggplot2
- Familiarity with
sf
is encouraged. Read Geocomputing with R for an intro tosf
and geospatial data. - It would be helpful to take a look at last year’s Voyager workshop; this year I’m not covering the math behind ESDA, in order to focus on the new functionalities.
Time outline
Total: 90 minutes
Activity | Time |
---|---|
Introduction and setup | 15m |
Read data into R as SFE | 15m |
Getting, setting, and plotting SFE fields | 15m |
Images in SFE | 15m |
Spatial operations of SFE | 10m |
Aggregate and ESDA at different scales | 10m |
Split and ESDA across samples | 10m |
Workshop goals and objectives
- Learn basics of SFE and Voyager ESDA
- Learn to work with images and transcript spots in SFE
- Discussion on ESDA ideas for different lengths scales and samples
To use the Docker image
This workshop can be run remotely on the Bioconductor Workshop Galaxy. Alternatively, it can be run locally with the Docker image:
docker run -e PASSWORD=<choose_a_password_for_rstudio> -p 8787:8787 ghcr.io/lambdamoses/sfeworkshop2024
Once running, navigate to http://localhost:8787/ and then log in with rstudio
:yourchosenpassword
.
The required packages of the appropriate version as of July 2024 have been pre-installed on the Workshop Galaxy and in the Docker image. Devel versions of SFE, Voyager, and Bioconductor as of July 2024 are used here.