{"id":23885602,"url":"https://github.com/cryoem-uoft/cryosparc-tools","last_synced_at":"2025-04-06T06:07:42.312Z","repository":{"id":64719979,"uuid":"506400971","full_name":"cryoem-uoft/cryosparc-tools","owner":"cryoem-uoft","description":"Python library that enables scripting access to CryoSPARC, a cryo-EM software package.","archived":false,"fork":false,"pushed_at":"2025-03-27T14:22:46.000Z","size":46924,"stargazers_count":33,"open_issues_count":12,"forks_count":9,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2025-03-27T14:49:09.915Z","etag":null,"topics":["c","cryo-em","cryosparc","cryosparc-tools","high-performance-computing","image-processing","molecular-biology","python"],"latest_commit_sha":null,"homepage":"https://tools.cryosparc.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cryoem-uoft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-22T20:46:37.000Z","updated_at":"2025-03-27T13:58:48.000Z","dependencies_parsed_at":"2023-10-27T18:27:42.912Z","dependency_job_id":"c91238d5-39fe-446c-a9a4-cd7473a9413c","html_url":"https://github.com/cryoem-uoft/cryosparc-tools","commit_stats":{"total_commits":277,"total_committers":6,"mean_commits":"46.166666666666664","dds":0.0577617328519856,"last_synced_commit":"f0a1fca965cf02bab61239b7331a32f6bb303910"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryoem-uoft%2Fcryosparc-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryoem-uoft%2Fcryosparc-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryoem-uoft%2Fcryosparc-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryoem-uoft%2Fcryosparc-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cryoem-uoft","download_url":"https://codeload.github.com/cryoem-uoft/cryosparc-tools/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441049,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cryo-em","cryosparc","cryosparc-tools","high-performance-computing","image-processing","molecular-biology","python"],"created_at":"2025-01-04T05:45:15.201Z","updated_at":"2025-04-06T06:07:42.293Z","avatar_url":"https://github.com/cryoem-uoft.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cryosparc-tools\n\n[![PyPI](https://badgen.net/pypi/v/cryosparc-tools)](https://pypi.org/project/cryosparc-tools/)\n[![Python package](https://github.com/cryoem-uoft/cryosparc-tools/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/cryoem-uoft/cryosparc-tools/actions/workflows/python-package.yml)\n\nToolkit for interfacing with CryoSPARC. Read the documentation at\n[tools.cryosparc.com](https://tools.cryosparc.com)\n\n## Getting Help and Reporting Bugs\n\nFor usage questions and general discussion about `cryosparc-tools` scripts and functions, please post to the [CryoSPARC discussion forum](https://discuss.cryosparc.com/c/scripting) under the Scripting category.\n\nIf you would like to request or propose a feature, change or fix for `cryosparc-tools` source code, please either [report an issue](https://github.com/cryoem-uoft/cryosparc-tools/issues/new) or [submit a pull request](https://github.com/cryoem-uoft/cryosparc-tools/compare).\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for full details.\n\n## Development\n\n### Prerequisites\n\n- Git and Git LFS\n- Python \u003e= 3.8\n- Miniconda3\n- C compiler such as GCC or Clang\n\n### Set Up\n\n1. Clone this repository\n   ```sh\n   git clone --recursive https://github.com/cryoem-uoft/cryosparc-tools.git\n   cd cryosparc-tools\n   git lfs pull\n   ```\n2. (Optional) Create and activate a virtual environment\n   ```sh\n   python3 -m venv .venv\n   source .venv/bin/activate  # macOS / Linux\n   # OR\n   .venv\\Scripts\\activate.bat  # Windows\n   ```\n3. Install dev dependencies and build native modules\n   ```sh\n   pip install -U pip wheel\n   pip install -e \".[dev]\"\n   ```\n4. Install pre-commit hooks\n   ```\n   pre-commit install\n   ```\n\n### Re-compile native module\n\nRecompile native modules after making changes to C code:\n\n```sh\npython -m setup build_ext -i\n```\n\n## Build Packages for Publishing\n\nInstall build dependencies\n\n```sh\npip install -e \".[build]\"\n```\n\nRun the build\n\n```sh\npython -m build\n```\n\nPackages for the current architecture and python version are added to the\n`dist/` directory.\n\n## Build Documentation\n\nDocumentation is located in the `docs` directory and is powered by [Jupyter Book](https://jupyterbook.org/en/stable/intro.html).\n\nTo build the docs, install build dependencies\n\n```sh\npip install -e \".[build]\"\n```\n\nThen run Jupyter Book\n\n```sh\njupyter-book build docs\n```\n\nSite will be be built into the `docs/_build/html` directory.\n\n**Note:** Jupyter Book is not configured to re-run example notebooks upon build\nsince the notebooks require an active CryoSPARC instance to run.\n\nSee the [Run Example Notebooks](#run-example-notebooks) section for instructions\non how to run the notebooks.\n\nInline source documentation is compiled to HTML via [Sphinx](https://www.sphinx-doc.org/en/master/index.html) and uses [Google Style Python docstrings](https://www.sphinx-doc.org/en/master/usage/extensions/example_google.html#example-google).\n\n## Run Example Notebooks\n\nThe Jupyter notebooks in the example documentation require additional\ndependencies to execute, including the following system configuration:\n\n- Nvidia GPU and driver\n- [Miniconda](https://docs.conda.io/en/latest/miniconda.html) installed\n- CryoSPARC running at `localhost:40000` or `cryoem0:40000` (can alias `cryoem0` to localhost)\n\nClean previous build artefacts:\n\n```sh\nrm -rf cryosparc/*.so build dist *.egg-info\n```\n\nInstall dependencies into a new conda environment:\n\n```sh\nconda create -n cryosparc-tools-example -c conda-forge python=3 numpy=1.18.5 \\\n    pyqt=5 libtiff wxPython=4.1.1 adwaita-icon-theme 'setuptools\u003c66'  # exclude these dependencies if you don't need cryolo\nconda activate cryosparc-tools-example\npip install cryosparc-tools matplotlib~=3.4.0 pandas~=1.1.0 notebook\npip install nvidia-pyindex  # exclude last two steps if you don't need cryolo\npip install 'cryolo[c11]'\n```\n\nRun the notebook server with the following environment variables:\n\n- `CRYOSPARC_EMAIL` with a CryoSPARC user account email\n- `CRYOSPARC_PASSWORD` with a CryoSPARC user account password\n\nYou may also need to include `LD_LIBRARY_PATH` which includes the location of\nCUDA Toolkit and cuDNN runtime libraries (e.g., `~/miniconda3/envs/tools/lib/python3.8/site-packages/nvidia/*/lib`).\n\n```\nCRYOSPARC_EMAIL=\"ali@example.com\" \\\nCRYOSPARC_PASSWORD=\"password123\" \\\njupyter notebook\n```\n\nFind examples in `docs/examples` directory\n\n## License\n\ncryosparc-tools is licensed under the BSD-3-Clause license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryoem-uoft%2Fcryosparc-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryoem-uoft%2Fcryosparc-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryoem-uoft%2Fcryosparc-tools/lists"}