Skip to content

copick deposit

core

Create a depositable view of a copick project using symlinks.

Usage

copick deposit [OPTIONS]

Description

This command creates a hierarchical directory structure suitable for uploading to the cryoET data portal. It operates on a single copick config and creates symlinks to the actual data files, allowing multiple projects to be deposited into the same target directory through successive executions. The directory structure conforms to the standard copick filesystem layout.

Picks, meshes, segmentations, tomograms, and features are selected via URI filters and are skipped entirely when their option is not provided. For data portal projects, run names are automatically transformed from portal run IDs to {dataset_id}_{portal_run_name}_{portal_run_id} unless --run-name-prefix is given.

Successive executions to the same target directory are safe and idempotent: symlinks that already exist and point to the correct source are skipped. Read-only data from the portal cannot be symlinked and will raise an error.

Options

Option Type Default Description
-c, --config path Path to the configuration file.
--target-dir directory required Target directory for the deposited view (required).
--run-names text "" Comma-separated list of specific run names to process. If not specified, processes all runs.
--run-name-prefix text "" Prefix to prepend to all run names. For data portal projects, if not provided, automatically constructs '{dataset_id}{portal_run_name}' for each run.
--run-name-regex text Optional regex to define how to extract run names from copick run names. Run names will be extracted from the first group defined using parentheses in the pattern.
--picks text · multiple URIs to filter picks (e.g., 'proteasome:/' or 'ribosome:user1/*'). Can be specified multiple times. If not specified, skips picks entirely.
--meshes text · multiple URIs to filter meshes. Can be specified multiple times. If not specified, skips meshes entirely.
--segmentations text · multiple URIs to filter segmentations (e.g., 'membrane:/@10.0'). Can be specified multiple times. If not specified, skips segmentations entirely.
--tomograms text · multiple URIs to filter tomograms (e.g., 'wbp@10.0'). Can be specified multiple times. If not specified, skips tomograms entirely.
--features text · multiple URIs to filter features (e.g., 'wbp@10.0:cellcanvas'). Can be specified multiple times. If not specified, skips features entirely.
--max-workers integer 8 Number of parallel workers for processing runs.
--debug / --no-debug boolean flag False Enable debug logging.

Examples

# Deposit all runs from a filesystem project
copick deposit -c filesystem_config.json --target-dir /path/to/deposit \
    --picks "*:*/*" --meshes "*:*/*"

# Deposit from a data portal project (automatic run name transformation)
# Runs will be named like: 10301_TS_001_<portal_run_id>
copick deposit -c portal_config.json --target-dir /path/to/deposit \
    --picks "proteasome:*/*" --picks "ribosome:*/*" \
    --segmentations "membrane:*/*@10.0"

# Deposit with an explicit prefix override
copick deposit -c config.json --target-dir /path/to/deposit \
    --run-names "TS_001,TS_002" --run-name-prefix "custom_prefix_" \
    --picks "*:*/*"

# Deposit with a regex to extract run names
copick deposit -c config.json --target-dir /path/to/deposit \
    --run-name-regex "^(TS_\d+).*" --tomograms "wbp@10.0"

# Deposit multiple projects to the same target (successive executions)
copick deposit -c project1.json --target-dir /deposit --run-name-prefix "proj1_" \
    --picks "*:*/*"
copick deposit -c project2.json --target-dir /deposit --run-name-prefix "proj2_" \
    --picks "*:*/*"