README.md

Introduction

While single cell RNA-seq (scRNA-seq) gives us insights on biological systems with unprecedented resolution, as tissue dissociation is required for scRNA-seq, spatial context of gene expression is lost. novoSpaRc is a way to reconstruct the spatial context of gene expression by optimal transport. novoSpaRc is described in the paper Charting a Tissue from Single Cell Transcriptomes. The paper authors implemented this method in Python, which can be found here. This package is an R implementation of this method.

In short, what novoSpaRc does is to find a probabilistic assignment of cells to locations by aligning structural similarities between the graphs generated for single cells in expression space and physical space, with or without taking into account an in situ atlas that quantifies expression of some landmark genes in spatial locations.

Installation

This package is not yet on CRAN or Bioconductor. Please install it with

devtools::install_github("lambdamoses/novoSpaRc")

We also strongly recommend an optimized BLAS, as this package makes heavy use of matrix multiplications, and the matrices can be large for larger datasets. The default BLAS that comes with R is not optimized; an optimized BLAS can speed up matrix multiplications several times. To use an optimized BLAS from R, you can install Microsoft R Open, which uses the optimized Intel Math Kernel Library (MKL) on Windows and Linux and Acceleration Framework on MacOS for BLAS. Other optimized BLAS are OpenBLAS and ATLAS.

For MacOS users, you may change the version of BLAS used by R without reinstalling R by adding a symbolic link from libRblas.dylib to the desired BLAS. For example, for R installed from CRAN binary, here is how to make R use the BLAS from Acceleration Framework, which comes with MacOS:

cd /Library/Frameworks/R.framework/Resources/lib
ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib \
libRblas.dylib

For changing BLAS on Windows and Ubuntu, see this blog post. For Fedora, see this post.



lambdamoses/novoSpaRc documentation built on May 12, 2019, 3:14 p.m.