Skip to content

Stereo Sequencing Data Processing

Guang-Wei Zhang edited this page Aug 22, 2023 · 3 revisions

This document provides an overview of the script designed to process spinal cord stereo sequencing data. The main steps undertaken by the script are:

1. Visualization and Coordination:

  • Objective: Visualize captured RNA sequences to identify the spatial region associated with each sample.
  • Procedure:
    • For each sample, determine and record the boundaries in terms of x_min, x_max, y_min, and y_max. These boundaries set the stage for subsequent data cropping operations.

2. Data Cropping:

  • Objective: Crop sections of multiple samples sequenced on the same chip based on the predetermined coordinates.
  • Procedure:
    • The script processes two types of data:
      1. Bin1 data (with the .gef extension).
      2. Cell bin data (also with the .gef extension).
    • After processing, the cropped results are saved as .h5ad files, which are suitable for downstream analysis.

3. Create a tissue segmentation using labelme based on bin1 plot, here in the bin1 plot exported image, each pixel corresponding to 1 unit in the chip. The labelme segmentation coordiante could be directly applied to the gene matrix cutting.

4. Voronoi Generation based on cell bin center

  • Objective: Redefine spatial regions based on cell bin centers and re-allocate the Bin1 data into these newly defined cell bins.
  • Procedure:
    • The script creates new Voronoi tessellations using the centers of the cell bins.
    • Regions outside the tissue segmentation will be filtered out.

5. Obtaining offset coordinate for all sections.

  • Offset the cell bin json file coordinate based on the bin1 h5ad minx and min y that all the json polygon could be coupled with the bin1 cropped image.
  • Offset the h5ad bin1 file for following up processing.
  • then we need to get the minx and miny from the cropped bin1 h5ad files

5. Cell Cut

  • The Bin1 data is then rebinned according to these new cell bin divisions.
  • This process, known as "cell cut," ensures a more accurate representation of the spatial RNA data.

Note: Users are advised to familiarize themselves with the terms and data formats (such as .gef and .h5ad) to ensure smooth processing and accurate interpretation of the results.

Data processing pipeline

preparation of cell bin data

Data Structure of scanpy

Clone this wiki locally