This is the repository that contains GPU-accelerated multireference alignment code for cryo-EM image processing. The code is used in the 2020 NCHC GPU Hackathon.
Team member: Szu Chi Chung, Cheng-Yu Hung, Huei-Lun Siao, Hung-Yi Wu, Institute of Statistical Science, Academia Sinica
Mentor: Ryan Jeng, Nvidia
Cryo-RALib -- a modular library for accelerating alignment in cryo-EM. Szu-Chi Chung, Cheng-Yu Hung, Huei-Lun Siao, Hung-Yi Wu, Wei-Hau Chang, I-Ping Tu. https://arxiv.org/abs/2011.05755
- Multireference alignment
We compared the CPU implementation from EMAN2 and used Ribosome 80s benchmark dataset but downsampling to 90 pixels. The following chart is running on TWCC c.super instance. The
xr
,yr
,ou
,maxit
is set to 3,3,36,6 respectively.
The speedup is 22x~37x with different reference number.
- Reference-free alignment
The following chart is running on TWCC c.super instance. The ts
, ou
, maxit
is set to 1,36,6 respectively.
The speedup is 2.4x~9.4x with different 2D shifts.
- Install
EMAN2
andSphire
:
Note you may need to relink the nvrtc library
ln -s /usr/local/cuda/lib64/libnvrtc-builtins.so.10.0.130 /usr/local/EMAN2/lib/libnvrtc-builtins.so
$ ./install.sh
- You may need to modify the shebang line in the python scripts to point out the location of the EMAN2 library.
Test data can be downloaded from here. See the Example Notebook for more details.
-
Multi-reference alignment
mpirun -np 4 test_mref_cheng_yu_bdb_cuda.py rib80s_ori_bin.hdf rib80s_ref.hdf out --ou=36 --xr=3 --yr=3
mpirun -np 4 test_mref_gpu_align.py rib80s_ori_bin.hdf rib80s_ref.hdf out --ou=36 --xr=3 --yr=3
-
Reference-free alignment
mpirun -np 4 test_reffree_gpu_align.py rib80s_ori_bin.hdf out --ou=36 --xr=3 --yr=3 --ts=1
The python environment exposed by EMAN2 can be couple with CuPy and other libraries for drop-in acceleration and visualization. See the Example Notebook where we accelerate the rotation and shift operations by five-fold and visualize the results.
The library can be used for exploratory data analysis as demonstrated in the notebook. You will need the utils_ralib.py and scikit-learn for analysis.
Cryo-RAlib is open source software released under the GNU General Public License, Version 3.
Some of the code is built upon Cuda code from gpu_isac 2.3.2.