PRISM is the post-stitching half of the pipeline: readout → gene_calling → cell_segmentation → analysis. For the pipeline overview and diagram, see the main README; for sample-data downloads, see Data Sources.
Install the package first — see the Installation Guide. All commands below run from the repository root.
Prerequisites:
- Download sample data from Zenodo (e.g. MouseEmbryo); see Data Sources for the full list.
- Organize data according to Data Architecture: stitched per-channel TIFFs under
<RUN_ID>_processed/stitched/.
Workflow Steps:
-
Spot Detection / Readout — edit
base_dir(and, if needed,channel_files) inconfigs/readout.yaml, then run:python scripts/readout.py <RUN_ID>
Outputs
readout/position.csvandreadout/intensity.csv. -
Gene Calling — set
BASE_DIRandRUN_IDat the top ofscripts/gene_calling.py(or pass a config file), then run:python scripts/gene_calling.py
Outputs
readout/mapping.csv(gene assignments + confidence) andreadout/intensity_corrected.csv. The default method is GMM / codebook-GMM. For an interactive walkthrough, usenotebooks/readout_gene_calling_2D.ipynbornotebooks/gene_calling_GMM.ipynb. -
Cell Segmentation — segment nuclei from the DAPI channel:
python scripts/segment_dapi.py <RUN_ID>
Outputs nucleus centroids (
segmented/dapi_centroids.csv) and a label image. -
Cell-by-gene matrix & cell typing — assign RNA spots (
mapping.csv) to their nearest nucleus and build the expression matrix innotebooks/cell_typing_and_analysis.ipynb.
Expected Outputs:
readout/position.csv,readout/intensity.csv: detected RNA spots (coordinates + per-channel intensities)readout/mapping.csv: spots with gene assignments and confidencesegmented/dapi_centroids.csv: nucleus centroids- cell-by-gene expression matrix: built in the cell-typing notebook
PRISM does not ship an in-tree image-processing layer. For raw → stitched output (focal stacking, illumination correction, registration, pcorr_bigstitcher / MIST stitching, AIRLOCALIZE), use the companion spatial_img_core package (not yet public — request access at huanglab111@gmail.com). Once stitched images land under <RUN_ID>_processed/stitched/, continue with Option A above.
- View Detailed Usage Guide for comprehensive workflow instructions
- Understand Data Architecture requirements
- Refer to Installation Guide for environment setup
- Explore Configuration Guide for parameter customization