本家様 http://huanglab.phys.hust.edu.cn/EMReady/
EMReady is a three-dimensional nested U-net-based framework for improving the interpretability of cryo-EM maps using similarity and correlation-guided deep learning.
(DeepL様翻訳)
EMReadyは、類似性と相関に導かれたディープラーニングを用いて低温電子顕微鏡マップの解釈可能性を向上させるための、3次元ネストされたU-netベースのフレームワークです。
単体アプリとして作れるし、Scipionのplug-inとしても利用できるみたい. https://github.com/scipion-em/scipion-em-emready
ここでは単体アプリとして作ってみる
condaアプリなので pyenv/anaconda を敷いてその上に EMReady 実行環境を作ります.
git clone https://github.com/yyuu/pyenv.git /apps/pyenv
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
pyenv install anaconda3-2024.06-1
pyenv global anaconda3-2024.06-1
source /apps/pyenv/versions/anaconda3-2024.06-1/etc/profile.d/conda.sh
(既にpyenv/anacondaが用意されているなら下記の実行)
source /apps/pyenv/versions/anaconda3-2024.06-1/etc/profile.d/conda.sh
その上で
[root@rockylinux ~]# cat /etc/redhat-release
Rocky Linux release 8.10 (Green Obsidian)
[root@rockylinux ~]# cd /apps/src
[root@rockylinux src]# wget http://huanglab.phys.hust.edu.cn/EMReady2/EMReady_v2.1.tgz
[root@rockylinux src]# cd ..
[root@rockylinux apps]# tar xf src/EMReady_v2.1.tgz
[root@rockylinux apps]# cd EMReady_v2.1
[root@rockylinux EMReady_v2.1]# ls -l
total 112
-rwxr-x---. 1 573 514 4584 Jul 11 22:20 EMReady2.sh
-rwxr-x---. 1 573 514 327 Jul 11 22:20 environment.yml
-rwxr-x---. 1 573 514 3719 Jul 11 22:20 frn.py
-rwxr-x---. 1 573 514 7618 Jul 11 22:20 interp3d.f90
-rwxr-x---. 1 573 514 35213 Jul 11 22:20 LICENSE
drwxr-x---. 2 573 514 68 Jul 11 22:20 model_state_dicts
-rwxr-x---. 1 573 514 12500 Jul 11 22:20 pred.py
-rwxr-x---. 1 573 514 9975 Jul 11 22:20 README.md
-rwxr-x---. 1 573 514 11223 Jul 11 22:20 scunet.py
-rwxr-x---. 1 573 514 9112 Jul 11 22:20 utils.py
[root@rockylinux EMReady_v2.1]#
[root@rockylinux EMReady_v2.1]# conda env create -f environment.yml
[root@rockylinux EMReady_v2.1]# conda activate emready2_env
(emready2_env) [root@rockylinux EMReady_v2.1]# f2py -c ./interp3d.f90 -m interp3d
(emready2_env) [root@rockylinux EMReady_v2.1]# chmod 755 EMReady2.sh frn.py pred.py scunet.py utils.py ./model_state_dicts/ /apps/EMReady_v2.1
(emready2_env) [root@rockylinux EMReady_v2.1]# chmod 644 environment.yml interp3d.cpython-39-x86_64-linux-gnu.so interp3d.f90 LICENSE README.md ./model_state_dicts/*.pth
(emready2_env) [root@rockylinux EMReady_v2.1]# chown -R root. /apps/EMReady_v2.1
(emready2_env) [root@rockylinux EMReady_v2.1]# vi EMReady2.sh
:
EMReady2_home="/apps/EMReady_v2.1"
activate="/apps/pyenv/versions/anaconda3-2024.06-1/bin/activate"
EMReady2_env="emready2_env"
:
(emready2_env) [root@rockylinux EMReady_v2.1]# conda deactivate
[root@rockylinux EMReady_v2.1]#
「/apps/modulefiles/EMReady2」
#%Module
set em /apps/EMReady_v2.1
prepend-path PATH $em
本家様にテストデータがあります.
[saber@rockylinux ~]$ wget http://huanglab.phys.hust.edu.cn/EMReady/emd_22216.map.gz
まずはそれを入手して
[saber@rockylinux ~]$ gzip -d emd_22216.map.gz
[saber@rockylinux ~]$ module use /apps/modulefiles/
[saber@rockylinux ~]$ module load EMReady2
[saber@rockylinux ~]$ EMReady2.sh
EMReady2 by Huang Lab @ HUST (http://huanglab.phys.hust.edu.cn/EMReady)
USAGE: EMReady2.sh in_map.mrc out_map.mrc [options]
Descriptions:
in_map.mrc : Input EM density map in MRC2014 format
out_map.mrc : Filename of the output processed density map
-g : ID(s) of GPU devices to be used, e.g., 0 for GPU #0, and 2,3,6 for GPUs #2, #3, and #6
default: 0
-s : The stride of the sliding window to cut the input map into overlapping boxes. The value should be an integer within the range of [6, 48]. A smaller stride means a larger number of overlapping boxes
default: 12
-b : Number of input boxes in one batch. Users can adjust 'batch_size' according to the available VRAM of their GPU devices. Empirically, a GPU with 40 GB VRAM can afford a 'batch_size' of about 200
default: 10
-m : Input mask map in MRC2014 format
-c : The contour threshold to binarize the mask map
default: 0.0
-p : Input structure in PDB or mmCIF format to be used as the mask
-r : Zone radius of the mask around the input structure in Angstrom
default: 4.0
-mo : Filename of the output binary mask map
--use_cpu : Run EMReady2 on CPU instead of GPU
--inverse : Inverse the mask
--interp_back : Interpolate the grid size of the processed map back to the original size
[saber@rockylinux ~]$
[saber@rockylinux ~]$ EMReady2.sh emd_22216.map emd_22216_EMReady.map
GPUも使ってくれます.