The covariance environment defines cellular niches for spatial inference - Doron Haviv; Ján Remšík; Mohamed I. Gatie; Catherine Snopkowski; Meril Takizawa; Nathan Pereira; John Bashkin; Stevan Jovanovich; Tal Nawy; Ronan Chaligné; Adrienne Boire; Anna‐Katerina Hadjantonakis; et al. (2024)
A key challenge of analyzing data from high-resolution spatial profiling technologies is to suitably represent the features of cellular neighborhoods or niches. Here we introduce the covariance environment (COVET), a representation that leverages the gene-gene covariate structure across cells in the niche to capture the multivariate nature of cellular interactions within it. We define a principled optimal transport-based distance metric between COVET niches that scales to millions of cells. Using COVET to encode spatial context, we developed environmental variational inference (ENVI), a conditional variational autoencoder that jointly embeds spatial and single-cell RNA sequencing data into a latent space. ENVI includes two decoders: one to impute gene expression across the spatial modality and a second to project spatial information onto single-cell data. ENVI can confer spatial context to genomics data from single dissociated cells and outperforms alternatives for imputing gene expression on diverse spatial datasets.