Skip to content

copick add tomogram

core

Add a tomogram to the project.

Usage

copick add tomogram [OPTIONS] PATH

Description

Imports a single tomogram, or many at once via a glob pattern, into one or more runs. The file format is inferred from the extension unless --file-type is given, and a multiscale pyramid is computed by default.

Arguments

Argument Description
PATH Path to the tomogram file (MRC, Zarr, TIFF, or EM) or a glob pattern.

Options

Option Type Default Description
-c, --config path Path to the configuration file.
--run-name-prefix text "" Prefix to prepend to run names after regex extraction.
--run-regex text (.*) Regular expression to extract the run name from the filename. If not provided, will use the file name without extension. The regex should capture the run name in the first group.
--run text "" The name of the run. If not specified, will use the name of the file (stripping extension), ignored if PATH is glob pattern.
--tomo-type text wbp The name of the tomogram (e.g. wbp).
--file-type choice (mrc | zarr | tiff | em) The file type of the tomogram ('mrc', 'zarr', 'tiff', or 'em'). Will guess type based on extension if omitted.
--voxel-size float Voxel size in Angstrom. Overrides voxel size in the tomogram header.
--chunk-size text 256,256,256 Chunk size for the output Zarr file.
--pyramid-levels integer 3 Number of pyramid levels (each level corresponds to downscaling by factor two).
--create-pyramid / --no-create-pyramid boolean flag True Compute the multiscale pyramid.
--max-workers integer 4 Maximum number of worker threads.
--flip text Flip (reverse) volume along specified axes. Comma-separated axis indices, e.g., '0' to flip Z, '0,2' to flip Z and X. Default: no flipping.
--transpose text Transpose volume axes. Specify target axis order, e.g., '2,1,0' to reverse all axes, '0,2,1' to swap Y and X. Default: no transposition.
--overwrite / --no-overwrite boolean flag False Overwrite the object if it exists.
--create / --no-create boolean flag True Create the object if it does not exist.
--debug / --no-debug boolean flag False Enable debug logging.

Examples

# Import a single tomogram
copick add tomogram tomo.mrc -c config.json

# Import every matching file via a glob pattern
copick add tomogram "*.mrc" -c config.json

# Import with an explicit run name
copick add tomogram tomo.mrc -c config.json --run TS_001

# Extract the run name from the filename with a regex
copick add tomogram "TS*.mrc" -c config.json --run-regex "^(TS_\d+)"

See also