Toolkit for interfacing with CryoSPARC. Read the documentation at tools.cryosparc.com
- Git and Git LFS
- Python >= 3.7
- Miniconda3
- C compiler such as GCC or Clang
- Clone this repository
git clone https://github.com/cryoem-uoft/cryosparc-tools.git cd cryosparc-tools git lfs pull - Create and activate a conda environment named "tools" with the desired python version. See the Run Example Notebooks section to install an environment
conda create -n tools python=3.7 -c conda-forge conda activate tools
- Install dev dependencies and build native modules
pip install -U pip wheel pip install -e ".[dev]"
Recompile native modules after making changes to C code:
makeInstall build dependencies
pip install -e ".[build]"Run the build
python -m buildPackages for the current architecture and python version are added to the
dist/ directory.
Documentation is located in the docs directory and is powered by Jupyter Book.
To build the docs, install build dependencies
pip install -e ".[build]"Then run Jupyter Book
jupyter-book build docsSite will be be built into the docs/_build/html directory.
Note: Jupyter Book is not configured to re-run example notebooks upon build since the notebooks require an active CryoSPARC instance to run.
See the Run Example Notebooks section for instructions on how to run the notebooks.
Inline source documentation is compiled to HTML via Sphinx and uses Google Style Python docstrings.
The Jupyter notebooks in the example documentation require additional dependencies to execute, including the following system configuration:
- Nvidia GPU and driver
- Miniconda installed
- CryoSPARC running at
localhost:40000orcryoem5:40000(can aliascryoem5to localhost)
Clean previous build artefacts:
make cleanInstall dependencies into a new conda environment:
conda create -n cryosparc-tools-example -c conda-forge \
python=3 numpy==1.18.5 \
pyqt=5 libtiff wxPython=4.1.1 adwaita-icon-theme
conda activate cryosparc-tools-example
pip install -U pip
pip install nvidia-pyindex matplotlib">=3.4,<3.5" pandas==1.1.4 notebook
pip install "cryolo[c11]"
pip install -e ".[build]"Run the notebook server with the following environment variables:
CRYOSPARC_LICENSE_IDwith Structura-issued CryoSPARC licenseCRYOSPARC_EMAILwith a CryoSPARC user account emailCRYOSPARC_PASSWORDwith a CryoSPARC user account password
You may also need to include LD_LIBRARY_PATH which includes the location of
CUDA Toolkit and cuDNN runtime libraries (e.g., ~/miniconda3/envs/tools/lib/python3.8/site-packages/nvidia/*/lib).
CRYOSPARC_LICENSE_ID="xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" \
CRYOSPARC_EMAIL="ali@example.com" \
CRYOSPARC_PASSWORD="password123" \
jupyter notebook
Find examples in docs/examples directory
cryosparc-tools is licensed under the BSD-3-Clause.