Skip to content

CLI Reference

This page documents all available biahub command-line tools.

biahub

command-line tools for biahub.

Usage:

biahub [OPTIONS] COMMAND [ARGS]...

Options:

  -h, --help  Show this message and exit.

Subcommands

  • apply-inv-tf: Apply inverse transfer function to dataset
  • characterize-psf: Characterize point spread function (PSF)
  • compute-tf: Compute transfer function using PSF
  • concatenate: Concatenate datasets (with optional cropping)
  • deconvolve: Deconvolve across T and C axes using a PSF
  • deskew: Deskew a single position across T and C axes
  • estimate-bleaching: Estimate bleaching from raw data
  • estimate-crop: Estimate crop region for dual-channel alignment
  • estimate-deskew: Routine for estimating deskewing parameters
  • estimate-psf: Estimate point spread function from beads
  • estimate-registration: Estimate affine transform between timepoints or arms
  • estimate-stabilization: Estimate translation matrices for XYZ stabilization
  • estimate-stitch: Estimate stitching parameters for positions
  • flat-field: Apply flat field correction to selected channels
  • flip: Flip images in a dataset
  • nf: Nextflow utilities
  • optimize-registration: Optimize transform based on match filtering
  • process-with-config: Process data with YAML-defined functions
  • pyramid: Create pyramid levels for a dataset
  • reconstruct: Reconstruct a dataset using config
  • register: Apply an affine transformation to a single position
  • segment: Segment a position using pretrained model or pipeline
  • stabilize: Apply stabilization transforms to dataset
  • stitch: Stitch positions in wells of a zarr store
  • track: Track objects in 2D/3D time-lapse microscopy
  • virtual-stain: Run VisCy virtual staining

apply-inv-tf

Apply inverse transfer function to dataset

Usage:

biahub apply-inv-tf [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -t, --transfer-function-dirpath PATH
                                  Path to transfer function zarr (not required
                                  for --init).
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  --cluster [slurm|local|debug]   Execution cluster: 'slurm' submits to a
                                  Slurm cluster, 'local' runs jobs as
                                  subprocesses on this machine, 'debug' runs
                                  jobs in-process in the foreground.
                                  [default: slurm]
  -m, --monitor                   Monitor of submitted SLURM jobs.
  --init                          Only initialize the output store and exit;
                                  skip per-position processing.
  -h, --help                      Show this message and exit.

characterize-psf

Characterize point spread function (PSF)

Usage:

biahub characterize-psf [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -h, --help                      Show this message and exit.

compute-tf

Compute transfer function using PSF

Usage:

biahub compute-tf [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -h, --help                      Show this message and exit.

concatenate

Concatenate datasets (with optional cropping)

Usage:

biahub concatenate [OPTIONS]

Options:

  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  --cluster [slurm|local|debug]   Execution cluster: 'slurm' submits to a
                                  Slurm cluster, 'local' runs jobs as
                                  subprocesses on this machine, 'debug' runs
                                  jobs in-process in the foreground.
                                  [default: slurm]
  -m, --monitor                   Monitor of submitted SLURM jobs.
  --init                          Only initialize the output store and exit;
                                  skip per-position processing.
  --concat-data-paths TEXT        Resolve mode: inject these concat_data_paths
                                  into the config and write the resolved
                                  config to -o (a YAML file), then exit.
                                  Repeat the flag once per source store.
  -h, --help                      Show this message and exit.

deconvolve

Deconvolve across T and C axes using a PSF

Usage:

biahub deconvolve [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -p, --psf-dirpath DIRECTORY     Path to psf.zarr  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -m, --monitor                   Monitor of submitted SLURM jobs.
  -h, --help                      Show this message and exit.

deskew

Deskew a single position across T and C axes

Usage:

biahub deskew [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  --cluster [slurm|local|debug]   Execution cluster: 'slurm' submits to a
                                  Slurm cluster, 'local' runs jobs as
                                  subprocesses on this machine, 'debug' runs
                                  jobs in-process in the foreground.
                                  [default: slurm]
  -m, --monitor                   Monitor of submitted SLURM jobs.
  --init                          Only initialize the output store and exit;
                                  skip per-position processing.
  -h, --help                      Show this message and exit.

estimate-bleaching

Estimate bleaching from raw data

Usage:

biahub estimate-bleaching [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -h, --help                      Show this message and exit.

estimate-crop

Estimate crop region for dual-channel alignment

Usage:

biahub estimate-crop [OPTIONS]

Options:

  -c, --config-filepath FILE   Path to YAML configuration file.  [required]
  -o, --output-filepath FILE   Path to output file  [required]
  -sb, --sbatch-filepath FILE  SBATCH filepath that contains slurm parameters
                               to overwrite defaults. For example, '#SBATCH
                               --mem-per-cpu=16G' will override the default
                               memory per CPU.
  -l, --local                  Run jobs locally instead of submitting to
                               SLURM.
  --lf-mask-radius FLOAT       (Optional) Radius of the circular mask given as
                               fraction of image width to apply to the phase
                               channel.
  -h, --help                   Show this message and exit.

estimate-deskew

Routine for estimating deskewing parameters

Usage:

biahub estimate-deskew [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -o, --output-filepath FILE      Path to output file  [required]
  -h, --help                      Show this message and exit.

estimate-psf

Estimate point spread function from beads

Usage:

biahub estimate-psf [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -h, --help                      Show this message and exit.

estimate-registration

Estimate affine transform between timepoints or arms

Usage:

biahub estimate-registration [OPTIONS]

Options:

  -s, --source-position-dirpaths TUPLE
                                  Paths to source positions, for example:
                                  "source.zarr/0/0/0" or "source.zarr/*/*/*"
                                  [required]
  -t, --target-position-dirpaths TUPLE
                                  Paths to target positions, for example:
                                  "target.zarr/0/0/0" or "target.zarr/*/*/*"
                                  [required]
  -o, --output-filepath FILE      Path to output file  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -rt, --registration-target-channel TEXT
                                  Name of the target channel to be used when
                                  registration params are applied. If not
                                  provided, the target channel from the config
                                  file will be used.
  -rs, --registration-source-channel TEXT
                                  Name of the source channels to be used when
                                  registration params are applied. May be
                                  passed multiple times. If not provided, the
                                  source channels from the config file will be
                                  used.
  -h, --help                      Show this message and exit.

estimate-stabilization

Estimate translation matrices for XYZ stabilization

Usage:

biahub estimate-stabilization [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -h, --help                      Show this message and exit.

estimate-stitch

Estimate stitching parameters for positions

Usage:

biahub estimate-stitch [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -o, --output-filepath FILE      Path to output file  [required]
  --fliplr                        Flip images left-right before stitching
  --flipud                        Flip images up-down before stitching
  --flipxy                        Flip images along the diagonal before
                                  stitching
  --pcc-channel-name TEXT         Channel name to use for phase cross-
                                  correlation optimization (default: None,
                                  disables optimization)
  --pcc-z-index INTEGER           Z slice index to use for phase cross-
                                  correlation optimization (default: 0)
  --add_offset                    add the offset to estimated shifts, needed
                                  for OPS experiments
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -m, --monitor                   Monitor of submitted SLURM jobs.
  -h, --help                      Show this message and exit.

flat-field

Apply flat field correction to selected channels

Usage:

biahub flat-field [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  --cluster [slurm|local|debug]   Execution cluster: 'slurm' submits to a
                                  Slurm cluster, 'local' runs jobs as
                                  subprocesses on this machine, 'debug' runs
                                  jobs in-process in the foreground.
                                  [default: slurm]
  -m, --monitor                   Monitor of submitted SLURM jobs.
  --init                          Only initialize the output store and exit;
                                  skip per-position processing.
  -h, --help                      Show this message and exit.

flip

Flip images in a dataset

Usage:

biahub flip [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -x                              Enable the x flag.
  -y                              Enable the y flag.
  -h, --help                      Show this message and exit.

nf

Nextflow utilities

Usage:

biahub nf [OPTIONS] COMMAND [ARGS]...

Options:

  -h, --help  Show this message and exit.

Subcommands

  • list-positions: List position keys in a plate zarr (one per line, for Nextflow fan-out).

list-positions

List position keys in a plate zarr (one per line, for Nextflow fan-out).

Usage:

biahub nf list-positions [OPTIONS]

Options:

  -i, --input-zarr PATH  [required]
  -h, --help             Show this message and exit.

optimize-registration

Optimize transform based on match filtering

Usage:

biahub optimize-registration [OPTIONS]

Options:

  -s, --source-position-dirpaths TUPLE
                                  Paths to source positions, for example:
                                  "source.zarr/0/0/0" or "source.zarr/*/*/*"
                                  [required]
  -t, --target-position-dirpaths TUPLE
                                  Paths to target positions, for example:
                                  "target.zarr/0/0/0" or "target.zarr/*/*/*"
                                  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-filepath FILE      Path to output file  [required]
  -d, --display-viewer            Display the registered channels in a napari
                                  viewer
  -h, --help                      Show this message and exit.

process-with-config

Process data with YAML-defined functions

Usage:

biahub process-with-config [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -m, --monitor                   Monitor of submitted SLURM jobs.
  -h, --help                      Show this message and exit.

pyramid

Create pyramid levels for a dataset

Usage:

biahub pyramid [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -lv, --levels INTEGER           Total number of resolution levels including
                                  level 0. E.g., levels=4 creates 0, 1, 2, 3.
                                  [default: 4]
  -m, --method [stride|median|mode|mean|min|max]
                                  Downsampling method to use.  [default: mean]
  -h, --help                      Show this message and exit.

reconstruct

Reconstruct a dataset using config

Usage:

biahub reconstruct [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  --cluster [slurm|local|debug]   Execution cluster: 'slurm' submits to a
                                  Slurm cluster, 'local' runs jobs as
                                  subprocesses on this machine, 'debug' runs
                                  jobs in-process in the foreground.
                                  [default: slurm]
  -m, --monitor                   Monitor of submitted SLURM jobs.
  -h, --help                      Show this message and exit.

register

Apply an affine transformation to a single position

Usage:

biahub register [OPTIONS]

Options:

  -s, --source-position-dirpaths TUPLE
                                  Paths to source positions, for example:
                                  "source.zarr/0/0/0" or "source.zarr/*/*/*"
                                  [required]
  -t, --target-position-dirpaths TUPLE
                                  Paths to target positions, for example:
                                  "target.zarr/0/0/0" or "target.zarr/*/*/*"
                                  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  -m, --monitor                   Monitor of submitted SLURM jobs.
  -h, --help                      Show this message and exit.

segment

Segment a position using pretrained model or pipeline

Usage:

biahub segment [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -m, --monitor                   Monitor of submitted SLURM jobs.
  -h, --help                      Show this message and exit.

stabilize

Apply stabilization transforms to dataset

Usage:

biahub stabilize [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -c, --config-filepaths TUPLE    Paths to YAML configuration files. All must
                                  be existing files with .yml extension.
                                  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -m, --monitor                   Monitor of submitted SLURM jobs.
  -h, --help                      Show this message and exit.

stitch

Stitch positions in wells of a zarr store

Usage:

biahub stitch [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -v, --verbose                   Verbose stitching output. Default is False.
  -b, --blending-exponent FLOAT   Exponent for blending weights. 0.0 is
                                  average blending, 1.0 is linear blending,
                                  and >1.0 is progressively sharper S-curve
                                  blending.
  --debug                         Run in debug mode
  -m, --monitor                   Monitor of submitted SLURM jobs.
  -h, --help                      Show this message and exit.

track

Track objects in 2D/3D time-lapse microscopy

Usage:

biahub track [OPTIONS]

Options:

  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  -l, --local                     Run jobs locally instead of submitting to
                                  SLURM.
  -h, --help                      Show this message and exit.

virtual-stain

Run VisCy virtual staining

Usage:

biahub virtual-stain [OPTIONS]

Options:

  -i, --input-position-dirpaths TUPLE
                                  Paths to input positions, for example:
                                  "input.zarr/0/0/0", "input.zarr/0/0/[0-9]",
                                  or "input.zarr/*/*/*"  [required]
  -c, --config-filepath FILE      Path to YAML configuration file.  [required]
  -o, --output-dirpath DIRECTORY  Path to output directory  [required]
  -sb, --sbatch-filepath FILE     SBATCH filepath that contains slurm
                                  parameters to overwrite defaults. For
                                  example, '#SBATCH --mem-per-cpu=16G' will
                                  override the default memory per CPU.
  --cluster [slurm|local|debug]   Execution cluster: 'slurm' submits to a
                                  Slurm cluster, 'local' runs jobs as
                                  subprocesses on this machine, 'debug' runs
                                  jobs in-process in the foreground.
                                  [default: slurm]
  -m, --monitor                   Monitor of submitted SLURM jobs.
  --init                          Only initialize the output store and exit;
                                  skip per-position processing.
  -h, --help                      Show this message and exit.