copick sync segmentations
core
Synchronize segmentations between two Copick projects.
Usage
Description
Copies segmentation data from a source Copick project to a target project. You can
restrict the sync to specific runs, voxel spacings, segmentation names, and users, and
optionally remap source names to different target names. The source may instead be one
or more CryoET Data Portal datasets via --source-dataset-ids, in which case
--config is ignored and a temporary dataportal configuration is created.
When specific segmentation names are requested, the matching pickable objects are
created in the target project before copying (non-multilabel segmentations require the
name to match a pickable object). Use --exist-ok to overwrite segmentations that
already exist in the target.
Options
| Option | Type | Default | Description |
|---|---|---|---|
-c, --config |
path | — | Path to the configuration file. |
--source-dataset-ids |
text | "" |
Comma-separated list of dataset IDs to use as source from CryoET Data Portal. If provided, --config will be ignored and a temporary dataportal configuration will be created. |
--target-config |
path | required | Path to the target configuration file. |
--source-runs |
text | "" |
Comma-separated list of source run names to synchronize. If not specified, all runs will be synced. |
--target-runs |
text | "" |
Comma-separated mapping of source run names to target run names (e.g. 'run1:target1,run2:target2'). If not specified, source run names will be used. |
--voxel-spacings |
text | "" |
Comma-separated list of voxel spacings to consider for synchronization. If not specified, all voxel spacings will be synced. |
--source-names |
text | "" |
Comma-separated list of source segmentation names to synchronize. If not specified, all segmentations will be synced. |
--target-names |
text | "" |
Comma-separated mapping of source segmentation names to target names (e.g. 'seg1:target1,seg2:target2'). If not specified, source names will be used. |
--source-users |
text | "" |
Comma-separated list of source user IDs to synchronize. If not specified, all users will be synced. |
--target-users |
text | "" |
Comma-separated mapping of source user IDs to target user IDs (e.g. 'user1:target1,user2:target2'). If not specified, source user IDs will be used. |
--exist-ok / --no-exist-ok |
boolean flag | False |
Allow overwriting existing segmentations in the target project. |
--max-workers |
integer | 4 |
Maximum number of worker threads to use for synchronization. |
--log / --no-log |
boolean flag | False |
Enable verbose logging of the synchronization process. |
--debug / --no-debug |
boolean flag | False |
Enable debug logging. |
Examples
# Sync all segmentations from all runs
copick sync segmentations -c source_config.json --target-config target_config.json
# Sync specific runs and voxel spacings
copick sync segmentations -c source_config.json --target-config target_config.json \
--source-runs "run1,run2" --voxel-spacings "10.0,20.0"
# Sync specific segmentation names with name mapping
copick sync segmentations -c source_config.json --target-config target_config.json \
--source-names "ribosome,membrane" --target-names "ribosome:ribo,membrane:mem"
See also
copick sync picks— synchronize picks between projectscopick sync meshes— synchronize meshes between projectscopick sync tomograms— synchronize tomograms between projects