Optimization-Based Decoding of Imaging Spatial Transcriptomics Data

John Bryan, Loïc Binan, Cai McCann, Yonina C. Eldar, Samouil L. Farhi, Brian ClearybioRxiv 2022 · DOI

TL;DR

This paper introduces JSIT, a novel optimization-based algorithm for decoding spatial transcriptomics data. JSIT enables higher throughput by allowing imaging at lower magnifications, achieving comparable cell-typing accuracy to existing methods that require higher magnification.

What Problem Does This Paper Address?

Spatial transcriptomics (iST) techniques, like MERFISH, allow researchers to map gene expression within cells in their native tissue context at single-molecule resolution. However, current methods rely on high-magnification imaging, which is time-consuming and limits the overall throughput. This bottleneck restricts the ability to analyze larger tissue areas, profile more samples, or study dynamic biological processes. The paper aims to overcome this limitation by developing a decoding algorithm that can effectively process data acquired at lower magnifications.

Methods

The core of the paper is the Joint Sparse method for Imaging Transcriptomics (JSIT). JSIT reframes the decoding problem as an optimization problem, leveraging the inherent sparsity of iST data (i.e., fluorescence signals are sparse in spatial coordinates). Key aspects of JSIT include:

  • Optimization-Based Decoding: Instead of traditional multi-step pipelines (like deconvolution followed by assignment), JSIT jointly deconvolves optical signals and decodes transcript identities.
  • Sparsity Assumptions: JSIT explicitly incorporates knowledge of signal sparsity into its optimization framework. This makes it less reliant on perfectly separated optical signals, which is a common issue with lower-magnification imaging.
  • Mathematical Model: The iST data generation is modeled as $Y = AXC + \eta$, where $Y$ is the observed image data, $A$ is the microscope's point spread function (PSF), $X$ represents the spatial distribution and gene identity of mRNA (the target to be recovered), $C$ is the known codebook, and $\eta$ is noise.
  • Regularized Least-Squares Optimization: JSIT solves for $X$ by minimizing a regularized least-squares objective function that incorporates sparsity constraints (row-sparse and overall sparse) using a mixed $l_1/l_2$ norm and an $l_1$ norm.
  • FISTA Algorithm: The optimization problem is solved using the Fast Iterative Shrinkage-Thresholding Algorithm (FISTA).
  • Preliminary Denoising: A difference-of-Gaussians band-pass filter is applied to minimize high- and low-frequency noise before the main decoding step.
  • Post-processing and Data Cleanup: This includes adaptively filtering decoded spots, assigning transcripts to cells using a seeded watershed approach, and correcting for spatial variations in signal intensity due to microscope optics.

Datasets

The study utilizes MERFISH data from the mouse primary motor cortex (MOp). This data was acquired at two different magnifications:

  • 60x magnification: Used for initial benchmarking and comparison with existing methods.
  • 40x magnification: The focus of the study, demonstrating JSIT's ability to achieve comparable results to 60x data with lower magnification.

The dataset includes information on 115 genes relevant for cell typing in the mouse brain.

Key Insights and Ideas

  • Lower Magnification is Viable: The most significant insight is that effective transcript decoding and cell typing are achievable with lower-magnification imaging, drastically improving throughput.
  • Optimization Unlocks Lower Magnification: By framing decoding as an optimization problem that explicitly leverages sparsity, JSIT can overcome the signal ambiguity inherent in lower-resolution images.
  • Sparsity is Key: The success of JSIT hinges on its ability to exploit the fact that mRNA molecules are sparsely distributed in space and that each gene has a unique barcode.
  • Joint Decoding Advantage: Combining deconvolution and decoding into a single optimization step is more powerful than sequential approaches, especially when dealing with less ideal imaging conditions.

Key Results

  • Comparable Cell Typing: JSIT, when applied to 40x data, achieved cell typing accuracy comparable to MERlin's analysis of 60x data.
  • Improved Throughput: By enabling lower-magnification imaging, JSIT significantly increases the potential throughput for spatial transcriptomics experiments.
  • Higher Sensitivity at 40x (JSIT vs. MERlin): For 40x data, JSIT detected more transcripts per cell and more genes with non-zero counts compared to MERlin analyzing the same 40x data.
  • Brighter Spots: JSIT's decoded spots generally had higher intensity than MERlin's, suggesting fewer false positives from dim autofluorescence noise.
  • Spatial Homogeneity: JSIT-decoded 40x data showed higher spatial homogeneity (0.40) in mapping cell types to spatial layers compared to MERlin-decoded 60x data (0.38), and significantly higher than MERlin-decoded 40x data (0.18).
  • Computational Cost: JSIT requires more computational time per FOV than MERlin (approximately 67-fold), but this is offset by reduced storage costs and the potential for parallelization.

Limitations and Future Work

  • Sensitivity Trade-off: While JSIT enables higher throughput, there is a slight drop in sensitivity at 40x magnification compared to 60x.
  • Computational Cost: JSIT's computational demands are higher than MERlin's, although this is presented as manageable with parallelization and cost models.
  • Future Work:
    • Extensibility: JSIT is readily extensible to other iST strategies (e.g., seqFISH+, STARmap) and can incorporate more complex noise models.
  • 3D Analysis: The method can be extended to 3D analysis of iST data.
  • Machine Learning Integration: Incorporating machine learning via algorithm unrolling could further reduce computational costs.
  • Broader Biological Questions: JSIT's increased throughput will enable the study of larger tissue samples, broader spatial contexts, and more complex biological relationships between cell types.

Summary updated

Abstract

Motivation Imaging Spatial Transcriptomics (iST) techniques characterize gene expression in cells in their native context by imaging barcoded probes for mRNA with single molecule resolution. However, the need to acquire many rounds of high-magnification imaging data limits the throughput and impact of existing methods. Results We describe the Joint Sparse method for Imaging Transcriptomics (JSIT), an algorithm for decoding lower magnification IT data than that used in standard experimental workflows. JSIT incorporates codebook knowledge and sparsity assumptions into an optimization problem which is less reliant on well separated optical signals than current pipelines. Using experimental data obtained by performing Multiplexed Error-Robust Fluorescence in situ Hybridization (MERFISH) on tissue from mouse motor cortex, we demonstrate that JSIT enables improved throughput and recovery performance over standard decoding methods. Contact [email protected] , [email protected] , [email protected] Availability and Implementation Software implementation of JSIT, together with example files, are available at https://github.com/jpbryan13/JSIT . Supplementary Information Supplementary data are available at Bioinformatics online.
BibTeX
@misc{bryan2022optimization,
  author = {John Bryan and Loïc Binan and Cai McCann and Yonina C. Eldar and Samouil L. Farhi and Brian Cleary},
  title = {{Optimization-Based Decoding of Imaging Spatial Transcriptomics Data}},
  year = {2022},
  doi = {10.1101/2022.11.22.517523},
  howpublished = {bioRxiv},
}
Figure