Skip to main content

Toolkit for interfacing with CryoSPARC

Project description

cryosparc-tools

Toolkit for interfacing with CryoSPARC. Read the documentation at tools.cryosparc.com

Development

Prerequisites

  • Git and Git LFS
  • Python >= 3.7
  • Miniconda3
  • C compiler such as GCC or Clang

Set Up

  1. Clone this repository
    git clone https://github.com/cryoem-uoft/cryosparc-tools.git
    cd cryosparc-tools
    git lfs pull
    
  2. 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
    
  3. Install dev dependencies and build native modules
    pip install -U pip wheel
    pip install -e ".[dev]"
    

Re-compile native module

Recompile native modules after making changes to C code:

make

Build Packages for Publishing

Install build dependencies

pip install -e ".[build]"

Run the build

python -m build

Packages for the current architecture and python version are added to the dist/ directory.

Build Documentation

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 docs

Site 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.

Run Example Notebooks

The Jupyter notebooks in the example documentation require additional dependencies to execute, including the following system configuration:

  • Nvidia GPU and driver
  • CryoSPARC running at localhost:39000

Clean previous build artefacts:

make clean

Install additional dependencies to conda environment before running pip:

conda create -n tools -c conda-forge \
   python=3.8 \
   cudatoolkit=11.6 \
   cudnn=8.3 \
   libtiff \
   notebook \
   pyqt=5 \
   wxPython=4.1.1 \
   adwaita-icon-theme
conda activate tools

Install notebook dependencies with pip.

pip install -U pip
pip install nvidia-pyindex

Install example deps and rebuild

pip install -e ".[examples]"
make

Run the notebook server with the CRYOSPARC_LICENSE_ID environment variable containing a CryoSPARC License, open in the browser. 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).

CRYOSPARC_LICENSE_ID="xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" jupyter notebook

Find examples in docs/examples directory

License

cryosparc-tools is licensed under the BSD-3-Clause.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cryosparc-tools-0.0.3.tar.gz (193.9 kB view hashes)

Uploaded Source

Built Distributions

cryosparc_tools-0.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (294.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

cryosparc_tools-0.0.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (295.0 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

cryosparc_tools-0.0.3-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (295.3 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

cryosparc_tools-0.0.3-cp311-cp311-win_arm64.whl (271.4 kB view hashes)

Uploaded CPython 3.11 Windows ARM64

cryosparc_tools-0.0.3-cp311-cp311-win_amd64.whl (280.3 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

cryosparc_tools-0.0.3-cp311-cp311-musllinux_1_1_x86_64.whl (705.1 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

cryosparc_tools-0.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (709.3 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

cryosparc_tools-0.0.3-cp311-cp311-macosx_10_9_x86_64.whl (292.9 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

cryosparc_tools-0.0.3-cp311-cp311-macosx_10_9_universal2.whl (365.6 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)

cryosparc_tools-0.0.3-cp310-cp310-win_arm64.whl (271.5 kB view hashes)

Uploaded CPython 3.10 Windows ARM64

cryosparc_tools-0.0.3-cp310-cp310-win_amd64.whl (281.1 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

cryosparc_tools-0.0.3-cp310-cp310-musllinux_1_1_x86_64.whl (686.5 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

cryosparc_tools-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (685.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cryosparc_tools-0.0.3-cp310-cp310-macosx_10_9_x86_64.whl (294.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

cryosparc_tools-0.0.3-cp310-cp310-macosx_10_9_universal2.whl (368.9 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

cryosparc_tools-0.0.3-cp39-cp39-win_arm64.whl (272.5 kB view hashes)

Uploaded CPython 3.9 Windows ARM64

cryosparc_tools-0.0.3-cp39-cp39-win_amd64.whl (282.1 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

cryosparc_tools-0.0.3-cp39-cp39-musllinux_1_1_x86_64.whl (690.4 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

cryosparc_tools-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (690.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cryosparc_tools-0.0.3-cp39-cp39-macosx_10_9_x86_64.whl (294.3 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

cryosparc_tools-0.0.3-cp39-cp39-macosx_10_9_universal2.whl (368.5 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

cryosparc_tools-0.0.3-cp38-cp38-win_amd64.whl (282.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

cryosparc_tools-0.0.3-cp38-cp38-musllinux_1_1_x86_64.whl (701.2 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

cryosparc_tools-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (692.0 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cryosparc_tools-0.0.3-cp38-cp38-macosx_10_9_x86_64.whl (292.6 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

cryosparc_tools-0.0.3-cp38-cp38-macosx_10_9_universal2.whl (365.3 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

cryosparc_tools-0.0.3-cp37-cp37m-win_amd64.whl (280.8 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

cryosparc_tools-0.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl (659.7 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

cryosparc_tools-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (660.3 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

cryosparc_tools-0.0.3-cp37-cp37m-macosx_10_9_x86_64.whl (293.2 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page