This repo includes scripts for segmenting spacetx data sets and mapping the results to a reference RNA-seq data set.
Currently there are two available scripts (which can be found in the scripts
folder). The data required to run these scripts is found elsewhere (as indicated within each script).
- Watershed segmentation (link) (Note: this is slow to load in the browser) - This script assigns cell ids to each spot from a spatial transcriptomics data set. More specifically, it reads in all spot data in the starfish
IntensityTable
format (each row is a spot, columns are locations and gene IDs), performs a modified watershed segmentation on all of the spot locations to assign each spot to a cell, and then appends a cell id column to theIntensityTable
. It also compiles an intensity matrix (cell x gene matrix with each value corresponding to spots per cell) and a meta-data matrix (e.g., spot location and area) for use with the mfishtools r library or other mapping (or clustering) strategies. In this case the example data is and smFISH experiment from the Allen Institute, which is available for download from thewg5-mapping
channel in the spacetx slack space. - Mapping cells to reference RNA-seq types. (link) - This script assigns cell types to each cell by mapping to RNA-seq cell types. Specifically, it reads in data from a spatial transcriptomics experiment (a cell x gene matrix as in #1 above) and compares it agains a reference RNA-seq data set by scaling the data sets to match and then running Pearson correlation to find the top match. In this case a 22 gene panel run on mouse VISp tissue using smFISH at the Allen Institute is compared against ~100 reference cell types from the ~12,000 cell FACs data set available from the Allen Institute website. Note: this method is under active development. Please review results carefully and any suggestions would be appreciated!
- If you want me to respond, tag me in relevant
Issues
or e-mail me directly. - Please respect the license and Contribution Agreement files as appropriate.