The Vizgen Post-processing Tool (VPT) is a command-line toolkit for reprocessing and refining the single-cell outputs of MERSCOPE experiments. VPT supports reproducible segmentation workflows, import of segmentation from external tools, and regeneration of downstream outputs on workstations, clusters, or cloud environments.
- Cell segmentation
- Reproduce standard Vizgen segmentation options
- Run custom and reproducible segmentation workflows
- Segmentation import
- Import boundaries produced by external tools
- Supports GeoJSON and HDF5 formats
- Single-cell output regeneration
- Cell-by-gene matrix
- Cell spatial metadata
- Per-cell image intensity
- Updated MERSCOPE Visualizer file (VZG)
- Image conversion
- Convert large TIFF files to single- or multi-channel pyramidal OME-TIFF
- Workflow integration
- Nextflow-compatible, with an example pipeline provided
Install VPT with your preferred method:
pip install vptdocker pull vzgdocker/vptgit clone https://github.com/Vizgen/vizgen-postprocessing
cd vizgen-postprocessing
poetry installTo view command help in your installed environment:
vpt --helpVPT supports plugin-based segmentation algorithms.
Install all supported plugins at once:
pip install vpt[all]if using poetry:
poetry install --all-extrasIn most cases, installing only the plugins you need is recommended.
Available plugins:
Uses a watershed-based approach with Stardist-derived seeds.
Install with:
pip install vpt-plugin-watershedInterface to Cellpose 1.0.2.
Install with:
pip install vpt-plugin-cellposeThis plugin is an interface to Cellpose 2.x.
Install with:
pip install vpt-plugin-cellpose2Interface to Cellpose 4.x using the Cellpose-SAM architecture. A GPU is strongly recommended because the model is large and runs very slowly on CPU.
Cellpose-SAM GitHub repository
Install with:
pip install vpt-plugin-cellposesamInterface to the Instanseg segmentation model. It runs on CPU or GPU and can use an arbitrary number of channels.
Install with:
pip install vpt-plugin-instansegVPT uses two input types to define segmentation runs:
- Command-line parameters
- Describe input locations and run-specific configuration
- Segmentation algorithm JSON parameters
- Define the processing steps applied to the input data
Reusing the same segmentation algorithm across experiments helps ensure consistent, reproducible processing.
In addition to the user guide, example segmentation algorithm JSON files are included and can be used directly or adapted as templates for custom workflows.
run-segmentation: Top-level segmentation entrypoint.prepare-segmentation: Generates a segmentation specification JSON file.run-segmentation-on-tile: Runs a segmentation algorithm for a specific image tile.compile-tile-segmentation: Combines per-tile outputs into one internally consistent parquet file.derive-entity-metadata: Computes geometric attributes for each segmented entity.partition-transcripts: Assigns each detected transcript to an entity when possible.sum-signals: Computes image intensity values per entity.update-vzg: Updates an existing VZG with new boundaries and expression matrix data.convert-geometry: Converts external boundaries into VPT-compatible parquet format.convert-to-ome: Converts large 16-bit mosaic TIFF images to pyramidal OME-TIFF.convert-to-rgb-ome: Converts up to three flat TIFF images into RGB pyramidal OME-TIFF.
For full command usage and options, see the user guide.
If you encounter issues or bugs, please submit an issue. Please include:
- A short issue summary
- Reproduction steps
- The exception/error output, if applicable
- Relevant code locations, if available
For other feedback, contact your regional Vizgen field application scientist and CC Vizgen Tech Support at techsupport@vizgen.com.
Please include "VPT" in the subject line.
We welcome code contributions! Please refer to the contribution guide before getting started.
Copyright 2022 Vizgen, Inc. All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
