Topaz (Bepler, et al)
Overview of the Topaz wrapper available through cryoSPARC.

Introduction

The Topaz wrapper in cryoSPARC, introduced in v2.12, incorporates deep learning models used in Topaz to automatically pick particles with a set of previously-picked particles or to denoise micrographs. The wrapper consists of four jobs:
  • Topaz Train
  • Topaz Cross Validation
  • Topaz Extract
  • Topaz Denoise
Use the first three jobs for particle picking. Use final job for micrograph denoising.
Topaz is a particle detection tool created by Tristan Bepler, Alex J. Noble and team:
1
Bepler, T., Morin, A., Rapp, M. et al. Positive-unlabeled convolutional neural networks for particle picking in cryo-electron micrographs. Nat Methods 16, 1153–1160 (2019) doi:10.1038/s41592-019-0575-8
2
3
Bepler, T., Noble, A.J., Berger, B. Topaz-Denoise: general deep denoising models for cryoEM. bioRxiv 838920 (2019) doi: <https://doi.org/10.1101/838920>
Copied!

Topaz License

Structura Biotechnology Inc. and cryoSPARC do not license Topaz nor distribute Topaz binaries. Please ensure you have your own copy of Topaz licensed and installed under the terms of its GNU General Public License v3.0.

Installing Topaz

cryoSPARC requires a Topaz installation in a dedicated Anaconda environment.

Create an Anaconda Python environment

Do not use the Anaconda Python installed with cryoSPARC. This installation is destroyed and recreated with cryoSPARC updates
Important considerations for Master/Worker or Cluster installations:
  • The path to the Anaconda installation on the machine hosting cryosparc_master must exactly match the path on machines hosting cryosparc_worker
  • The Anaconda installation directory must be accessible by the cryoSPARC Linux user account with the required permissions for executing the topaz binary
Use a previously-installed Anaconda Python (3.6+), or install new one (Miniconda3 is also sufficient).
Create the topaz Anaconda environment with the following commands:
1
conda create -n topaz python=3.6
2
conda activate topaz # changes to the topaz conda environment
3
# Use `source activate topaz` with anaconda < 4.4 if properly configured
Copied!
Once created and activated, run the following command to install Topaz version 0.2.4:
1
conda install topaz=0.2.4 cudatoolkit=11.2 -c tbepler -c pytorch -c conda-forge
Copied!
CryoSPARC has been tested with Topaz 0.2.4. Newer Topaz versions may also be compatible. More details on installing Topaz with Anaconda are available in the main Topaz repository: https://github.com/tbepler/topaz#installation

Find the Topaz Executable Path

Once Topaz is installed and the Anaconda environment is active in your current shell, enter the following command to determine the full path to the topaz binary:
1
which topaz
Copied!
The output should look similar to this:
1
/home/cryosparcuser/anaconda3/envs/topaz/bin/topaz
Copied!
In the cryoSPARC interface, specify this as the value for the "Path to Topaz executable" parameter:
If using this path results in errors when running a Topaz job (often with a message such as "topaz did not produce valid output"), try aliasing Topaz with a shell script that also activates the correct Anaconda environment. This process is described in the next section.

(Optional) Create a topaz.sh wrapper script

CryoSPARC has its own Anaconda installation and environment which may conflict with the Topaz environment. To prevent this, create a shell script that deactivates the cryoSPARC environment and activates the topaz one.
Create a topaz.sh file in a well known location such as the home directory (e.g., ~/topaz.sh). Add the following contents, making the noted substitutions:
1
#!/usr/bin/env bash
2
if command -v conda > /dev/null 2>&1; then
3
conda deactivate > /dev/null 2>&1 || true # ignore any errors
4
conda deactivate > /dev/null 2>&1 || true # ignore any errors
5
fi
6
unset _CE_CONDA
7
unset CONDA_DEFAULT_ENV
8
unset CONDA_EXE
9
unset CONDA_PREFIX
10
unset CONDA_PROMPT_MODIFIER
11
unset CONDA_PYTHON_EXE
12
unset CONDA_SHLVL
13
unset PYTHONPATH
14
unset LD_PRELOAD
15
unset LD_LIBRARY_PATH
16
17
source $HOME/anaconda3/etc/profile.d/conda.sh
18
conda activate topaz
19
Copied!
  • Substitute $HOME/anaconda3 on line 17 with the Anaconda installation directory.
Make this file executable by the cryoSPARC user from the command line
1
chmod +x topaz.sh
Copied!
In the cryoSPARC interface, specify the full path to topaz.sh as the "Path to Topaz executable" parameter:

Job Types

Topaz Deep Picking Tutorials