Definitions for a collaborative cryoET annotation tool.
Project description
copick
copick is a cross-platform, storage-agnostic and server-less dataset API for cryoET datasets. Access to the data is provided through an object-oriented API that abstracts away the underlying storage using the fsspec-family of libraries.
Why copick?
- storage-agnostic: Access data on local or shared filesystems, via SSH or on the cloud with the same API. No need for your own boilerplate!
- cloud-ready: Access image data quickly and in parallel thanks to multiscale OME-Zarr!
- server-less: No need for a dedicated server or database to access your data, just point copick to your data and go!
- cross-platform: copick works on any platform that supports Python. Compute on Linux, visualize on Windows or Mac, all with the same dataset API!
- ecosystem: Using the copick API allows visualizing and curating data in ChimeraX and Napari right away!
Documentation
For more information, see the documentation.
Installation
copick can be installed using pip. Using the all extra installs necessary requirements for all tested filesystem
implementations from the fsspec family (local, s3fs, smb, sshfs). A separate smb extra is available.
pip install "copick[all]"
[!NOTE]
copick>=1.2.0will fail to install withpip~=25.1.0. We recommend usingpip>=25.2oruv pipwhen installing copick.
Example dataset
An example dataset can be obtained from Zenodo.
To test with the example dataset:
-
Download and unpack the example dataset
-
Add the location of the
sample_project-directory in the unpacked dataset tofilesystem_overlay_only.json{ "name": "test", "description": "A test project.", "version": "1.0.0", "pickable_objects": [ { "name": "proteasome", "is_particle": true, "pdb_id": "3J9I", "label": 1, "color": [255, 0, 0, 255], "radius": 60, "map_threshold": 0.0418 }, { "name": "ribosome", "is_particle": true, "pdb_id": "7P6Z", "label": 2, "color": [0, 255, 0, 255], "radius": 150, "map_threshold": 0.037 }, { "name": "membrane", "is_particle": false, "label": 3, "color": [0, 0, 0, 255] } ], // Change this path to the location of sample_project "overlay_root": "local:///PATH/TO/EXTRACTED/PROJECT/", "overlay_fs_args": { "auto_mkdir": true } }
-
Start copick with the configuration file
from copick.impl.filesystem import CopickRootFSSpec root = CopickRootFSSpec.from_file('path/to/filesystem_overlay_only.json')
-
Access the data using the copick API
import zarr from copick.impl.filesystem import CopickRootFSSpec root = CopickRootFSSpec.from_file('path/to/filesystem_overlay_only.json') # Get a run by name run = root.get_run("TS_001") # Get a tomogram by name tomogram = run.get_voxel_spacing(10).get_tomogram("wbp") # Access the data group = zarr.open(tomogram.zarr()) arrays = list(group.arrays()) _, array = arrays[0]
Contributing
We welcome contributions to copick! Here's how to get started:
Development Setup
-
Clone the repository and install with development dependencies:
git clone https://github.com/copick/copick.git cd copick pip install -e ".[dev,test]"
-
Install pre-commit hooks:
pre-commit install -
Run tests to ensure everything is working:
pytest
Code Quality
We use several tools to maintain code quality:
- Black for code formatting
- Ruff for linting and import sorting
- Pre-commit hooks to enforce standards
Before submitting a PR, ensure your code passes all checks:
black src/ tests/
ruff check --fix src/ tests/
pytest
Conventional Commits
All pull requests must use Conventional Commits for commit messages. This helps us automatically generate changelogs and determine version bumps.
Examples:
feat: add support for new tomogram formatfix: resolve memory leak in zarr loadingdocs: update installation instructionstest: add unit tests for mesh operations
Plugin System
Copick supports a plugin system that allows external Python packages to register CLI commands. Commands can be added to the main CLI or organized into groups like inference, training, evaluation, process, and convert.
See the CLI documentation for detailed plugin development instructions and the copick-plugin-demo repository for a complete example.
Code of Conduct
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to opensource@chanzuckerberg.com.
Reporting Security Issues
If you believe you have found a security issue, please responsibly disclose by contacting us at security@chanzuckerberg.com.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file copick-1.23.1.tar.gz.
File metadata
- Download URL: copick-1.23.1.tar.gz
- Upload date:
- Size: 9.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74098ecfe2013eea94380dbb2fd912a9d4f31273b8643f712f3a7067937ab331
|
|
| MD5 |
3281127ed6b5d55c958f162088b00862
|
|
| BLAKE2b-256 |
802314b0f3b12f3b34ca53448621fa1eaf6ff508b93338865a82cc329d8183d4
|
Provenance
The following attestation bundles were made for copick-1.23.1.tar.gz:
Publisher:
release-please.yml on copick/copick
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
copick-1.23.1.tar.gz -
Subject digest:
74098ecfe2013eea94380dbb2fd912a9d4f31273b8643f712f3a7067937ab331 - Sigstore transparency entry: 1204096417
- Sigstore integration time:
-
Permalink:
copick/copick@55c592ad0f9a5d8caa298e113158dde8059f83bf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/copick
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@55c592ad0f9a5d8caa298e113158dde8059f83bf -
Trigger Event:
push
-
Statement type:
File details
Details for the file copick-1.23.1-py3-none-any.whl.
File metadata
- Download URL: copick-1.23.1-py3-none-any.whl
- Upload date:
- Size: 156.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c45081b0f49d411e4f32a415b988b4cf46cfb446bb70810bc8fb64c89627be26
|
|
| MD5 |
2fe0890067f469819108d2aa9cec4106
|
|
| BLAKE2b-256 |
54732a23cc60fa90af74c7cd4cefc986bcf2a3a56690f49cc89ad31e2764257d
|
Provenance
The following attestation bundles were made for copick-1.23.1-py3-none-any.whl:
Publisher:
release-please.yml on copick/copick
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
copick-1.23.1-py3-none-any.whl -
Subject digest:
c45081b0f49d411e4f32a415b988b4cf46cfb446bb70810bc8fb64c89627be26 - Sigstore transparency entry: 1204096420
- Sigstore integration time:
-
Permalink:
copick/copick@55c592ad0f9a5d8caa298e113158dde8059f83bf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/copick
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@55c592ad0f9a5d8caa298e113158dde8059f83bf -
Trigger Event:
push
-
Statement type: