Serval is a fully original decoding pipeline for multiplexed spatial transcriptomics developed by Jenkin Tsui at the University of British Columbia and BC Cancer Research Institute.
Serval is a modular framework that allows users to decode MERFISH images using various decoding methods, including MERlin (Emanuel et al., 2020), Simple Nearest Neighbor, and Cosine-optimized decoding.
- High‐accuracy barcode decoding via cosine‐optimized pixel matching
- Modular design: easily swap in/out different chromatic correction and filtering steps
- 
Clone the repository git clone https://github.com/Roth-Lab/serval.git cd Serval-Decode
- 
Create and activate your conda environment conda create --name serval-dev python=3.9 conda activate serval-dev 
- 
Install dependencies pip install -r requirements.txt 
To decode a dataset with default settings:
python /examples/standard_run.py \
  /examples/config.json4T1 cell culture dataset: https://doi.org/10.5281/zenodo.15678420, 4T1 tissue dataset: https://doi.org/10.5281/zenodo.15678603
If you use Serval Decode in your work, please cite:
Tsui, J. “Serval: A Cosine‐Optimized Pixel Decoder for Spatial Transcriptomics.” In preparation, 2025.
Serval Decode is licensed under the modified Apache License, Version 2.0; see the LICENSE file for details.
Copyright © 2025  
Jenkin Tsui. All rights reserved.
All other trademarks referenced herein are the property of their respective owners.