StereoCell is a tool for generating single-cell gene expression data
- pipeline
It supported on Stitching, Tissue segmentation, Cell segmentation and Cell labelling. Easy installation based on python==3.8 like,
pip install -r requirements.txt
If you need run the segmentation module, download the weights files first, then modify the file -> weights.json. Model zoo,
| Function | ML framework | resolution | Download |
|---|---|---|---|
| Cell segmentation | onnx | 256 | .onnx |
| Tissue segmentation | onnx | 512 | .onnx |
- manual tool on Windows
It supported on Stitching, Registration, Tissue segmentation and Single cell data visulization. Please download the installation package first, and follow the tutorial step by step. More detail refer this.
We recommend using Manual tool to complete Stitching & Registration module, and Pipeline to complete Segmentation & Cell labelling module
-
Sample Data
Image(FOV tiles, 3X3) and GeneMatrix -
Manual tool
Refer the tutorial step by step
- About pipeline
Segmentation & Cell Labelling
python .\cell_bin.py \
--image_path D:\code\mine\github\StereoCell\data\SS2000_regist.tif \
--matrix_path D:\code\mine\github\StereoCell\data\SS2000.gem.gz \
--out_path D:\code\mine\github\StereoCell\dataStitching
In shell
python .\stitch.py \
--input D:\\code\\mine\\github\\StereoCell\\data \
--output D:\\code\\mine\\github\\StereoCell\\data\\stitched.tif \
--overlap 0.12or in script
import stitch
input = 'D:\\code\\mine\\github\\StereoCell\\data'
output = 'D:\\code\\mine\\github\\StereoCell\\data\\stitched.tif'
stitch.stitch(input, output, overlap=0.12)Segmentation
In shell
python .\cell.py \
--input D:\StereoCell\data\image_6467_16800_512_512.tif \
-output D:\StereoCell\data\image_cell.tif \
or
python .\tissue.py \
--input D:\StereoCell\data\image_6467_16800_512_512.tif \
-output D:\StereoCell\data\image_tissue.tif \
Cell Labeling
In shellpython correct.py \
--way fast \
--mask_path D:\StereoCell\data\cell_mask.tif \
--matrix_path D:\StereoCell\data\gene.gem.gz \
--out_path D:\StereoCell\dataor in script
import correct
mask_path = 'D:\StereoCell\data\gene.gem.gz'
matrix_path = 'D:\StereoCell\data\cell_mask.tif'
out_path = 'D:\StereoCell\data'
correct.adjust('fast', mask_path, matrix_path, out_path, radius=50, process=10, threshold=20)Please cite StereoCell in your publications if it helps your research:
@article{StereoCell,
Author = {BGI Dev Group},
Year = {2022}
}