Skip to content

copick export picks

core

Export picks to external formats (EM, STAR, Dynamo, CSV).

Usage

copick export picks [OPTIONS]

Description

Selects picks with the --picks-uri filter (e.g. ribosome:user1/* or *:*/*) and writes them as TOM toolbox EM motivelists, RELION STAR files, Dynamo tables, or copick CSV. The EM, STAR, and Dynamo formats require --voxel-size (in Angstrom) to convert coordinates.

Two output modes are mutually exclusive: per-run mode (--output-dir) writes one file per run, while combined mode (--output-file) writes all runs to a single file. Combined EM/Dynamo export requires --index-map to assign a tomogram index to each run; per-run EM/Dynamo default to index 1 unless an index map is supplied, and STAR/CSV reference runs by name. For coordinate and Euler-angle conventions, see the docstrings in copick.util.formats.

Options

Option Type Default Description
-c, --config path Path to the configuration file.
--picks-uri text required URI to filter picks for export (e.g., 'ribosome:user1/' or ':/').
--output-dir directory Output directory for per-run export (one file per run). Mutually exclusive with --output-file.
--output-file file Output file for combined export (all runs in one file). Mutually exclusive with --output-dir.
--run-names text Comma-separated list of run names to process.
--output-format choice (em | star | dynamo | csv) required Output format for picks.
--voxel-size float Voxel size in Angstrom (required for EM, STAR, and Dynamo formats).
--index-map path CSV/TSV file mapping tomogram index to run name. Required for combined EM/Dynamo export, optional for per-run.
--include-optics / --no-include-optics boolean flag True Include optics group in STAR file output.
--max-workers integer 4 Maximum number of worker threads.
--debug / --no-debug boolean flag False Enable debug logging.

Examples

# Per-run export: one EM file per run
copick export picks -c config.json --picks-uri "ribosome:user1/*" \
    --output-dir ./output --output-format em --voxel-size 10.0

# Combined export: all runs to a single STAR file
copick export picks -c config.json --picks-uri "*:*/*" \
    --output-file ./particles.star --output-format star --voxel-size 10.0

# Combined export to a Dynamo table using an index map
copick export picks -c config.json --picks-uri "ribosome:*/*" \
    --output-file ./particles.tbl --output-format dynamo \
    --voxel-size 10.0 --index-map ./index_map.csv

See also