Skip to main content

Command line tool for highly parallelized processing of Vizgen data

Project description

License Coverage Status

Vizgen Post-processing Tool

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.

Features

  • 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

Installation

Install VPT with your preferred method:

pip

pip install vpt

Docker

docker pull vzgdocker/vpt

Poetry

git clone https://github.com/Vizgen/vizgen-postprocessing
cd vizgen-postprocessing
poetry install

To view command help in your installed environment:

vpt --help

Plugins

VPT supports plugin-based segmentation algorithms.

Install all supported plugins at once:

pip install vpt[all]

if using poetry:

poetry install --all-extras

In most cases, installing only the plugins you need is recommended.

Available plugins:

watershed

Uses a watershed-based approach with Stardist-derived seeds.

Watershed Github repository

Install with:

pip install vpt-plugin-watershed

cellpose

Interface to Cellpose 1.0.2.

Cellpose GitHub repository

Install with:

pip install vpt-plugin-cellpose

cellpose2

This plugin is an interface to Cellpose 2.x.

Cellpose2 GitHub repository

Install with:

pip install vpt-plugin-cellpose2

cellposesam :star2: New, April 28th, 2026 :star2:

Interface 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-cellposesam

instanseg :star2: New, April 28th, 2026 :star2:

Interface to the Instanseg segmentation model. It runs on CPU or GPU and can use an arbitrary number of channels.

Instanseg GitHub repository

Install with:

pip install vpt-plugin-instanseg

Usage

VPT 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.

Quick start commands

  • 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.

Documentation

User Guide

Feedback

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.

Contributing & Code of Conduct

We welcome code contributions! Please refer to the contribution guide before getting started.

Authors

Logo

License

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vpt-1.3.1.tar.gz (195.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vpt-1.3.1-py3-none-any.whl (242.0 kB view details)

Uploaded Python 3

File details

Details for the file vpt-1.3.1.tar.gz.

File metadata

  • Download URL: vpt-1.3.1.tar.gz
  • Upload date:
  • Size: 195.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vpt-1.3.1.tar.gz
Algorithm Hash digest
SHA256 f54091524e3d26f237224b1f1ad48dd24d82a23d7eb0316432358f82b417ccc9
MD5 9efd986279894b7590e2ac90a704cb5a
BLAKE2b-256 07959402730969e12de98394618d7540c33a2e7c95753ab514a8b51ad1becf40

See more details on using hashes here.

File details

Details for the file vpt-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: vpt-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 242.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vpt-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e80d29ecb085e85e265d5cb7c3ca76f1ba204a194d62e8bf17e4a6bc33e828c9
MD5 d6b7ecc576fb89b4d08c9527661081d7
BLAKE2b-256 59cde8c815350c095e196a1578da5d5c5b7666a01ad020385b88d72aefe9fa05

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page