Skip to content

copick add object

core

Add a pickable object to the project configuration.

Usage

copick add object [OPTIONS]

Description

Registers a new pickable object (a particle for point annotations or a segmentation for mask annotations) and writes it back to the configuration file. Optional metadata such as a numeric label, RGBA color, EMDB/PDB IDs, an ontology identifier, a display radius, and a density map (via --volume) can be attached to the object.

Options

Option Type Default Description
-c, --config path Path to the configuration file.
--name text required Name of the object to add.
--object-type choice (particle | segmentation) particle Type of object: 'particle' for point annotations or 'segmentation' for mask annotations.
--label integer Numeric label/id for the object. If not provided, will use the next available label.
--color text RGBA color for the object as comma-separated values (e.g. '255,0,0,255' for red).
--emdb-id text EMDB ID for the object.
--pdb-id text PDB ID for the object.
--identifier text Identifier for the object (e.g. Gene Ontology ID or UniProtKB accession).
--map-threshold float Threshold to apply to the map when rendering the isosurface.
--radius float 50 Radius of the particle, when displaying as a sphere.
--metadata text Additional metadata values to associate with the object, in JSON format.
--volume text Path to volume file to associate with the object.
--volume-format choice (mrc | zarr | map) Format of the volume file ('mrc' or 'zarr'). Will guess from extension if not provided.
--exist-ok / --no-exist-ok boolean flag False Whether existing objects with the same name should be overwritten.
--voxel-size float Voxel size for the volume data. Required if volume is provided.
--debug / --no-debug boolean flag False Enable debug logging.

Examples

# Add a particle object with a display radius
copick add object -c config.json --name ribosome --object-type particle \
    --radius 120

# Add a particle with a PDB reference and a custom color
copick add object -c config.json --name ribosome --object-type particle \
    --radius 120 --pdb-id 4V9D --color "255,0,0,255"

# Add a segmentation object with an explicit label
copick add object -c config.json --name membrane --object-type segmentation \
    --label 1 --color "0,255,0,128"

See also