本家様 https://github.com/IsoNet-cryoET/IsoNet
Isotropic Reconstruction of Electron Tomograms with Deep Learning

pythonアプリなのでtopazらのようにpyenv/anacondaを使ってpython実行環境を作ります

git clone https://github.com/yyuu/pyenv.git /apps/pyenv
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
pyenv install anaconda3-2022.05
pyenv global anaconda3-2022.05
export PATH=$PYENV_ROOT/versions/anaconda3-2022.05/bin/:$PATH

作成先は rockylinux8 です

[root@rockylinux ~]# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)
 
[root@rockylinux ~]# cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  520.56.06  Thu Oct  6 21:38:55 UTC 2022
GCC version:  gcc version 8.5.0 20210514 (Red Hat 8.5.0-10) (GCC)
 
[root@rockylinux ~]# nvidia-smi -L
GPU 0: NVIDIA RTX A2000 (UUID: GPU-23cc3ee7-31d3-a068-2f61-5aa00052d084)
 
[root@rockylinux ~]# /usr/local/cuda/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
 
[root@rockylinux ~]#

まずIsoNet 向けのpython実行環境を作って、そこにさらにpipでパッケージを追加します

[root@rockylinux ~]# conda create -n IsoNet python=3.8 tensorflow-gpu
 :
    cudatoolkit-10.1.243       |       h6bb024c_0       347.4 MB
    cudnn-7.6.5                |       cuda10.1_0       179.9 MB
 :
    numpy-1.23.3               |   py38h14f4228_1          10 KB
    numpy-base-1.23.3          |   py38h31eccc5_1         6.7 MB
 :
    tensorflow-2.4.1           |gpu_py38h8a7d6ce_0           4 KB
    tensorflow-base-2.4.1      |gpu_py38h29c2da4_0       195.2 MB
    tensorflow-estimator-2.6.0 |     pyh7b7c402_0         267 KB
    tensorflow-gpu-2.4.1       |       h30adc30_0           3 KB
 :
[root@rockylinux ~]# 
[root@rockylinux ~]# source activate IsoNet
 
(IsoNet) [root@rockylinux ~]# cd /apps
(IsoNet) [root@rockylinux apps]# git clone https://github.com/IsoNet-cryoET/IsoNet
(IsoNet) [root@rockylinux apps]# cd IsoNet
 
(IsoNet) [root@rockylinux IsoNet]# which pip
/apps/pyenv/versions/anaconda3-2022.05/envs/IsoNet/bin/pip
 
(IsoNet) [root@rockylinux IsoNet]# pip install -r requirements.txt
(IsoNet) [root@rockylinux IsoNet]# source deactivate
 
[root@rockylinux IsoNet]#

っでEnvironmentModules を用意します

[root@rockylinux ~]# cat /apps/modulefiles/IsoNet
#%Module
set          root   /apps/pyenv/versions/anaconda3-2022.05/envs/IsoNet
set          IsoNet /apps/IsoNet
prepend-path PATH   $IsoNet/bin:$root/bin
setenv PYTHONPATH   $IsoNet/../
 
[root@rockylinux ~]#

実行テスト

[illya@rockylinux ~]$ module use --append /apps/modulefiles
[illya@rockylinux ~]$ module load IsoNet
 
[illya@rockylinux ~]$ isonet.py check
IsoNet --version 0.2 installed
[illya@rockylinux ~]$

本家様のgitにgoogle driveでチュートリアルが公開されている. それを使って2,3テスト実行を行ってみる

[illya@rockylinux ~]$ module use --append /apps/modulefiles
[illya@rockylinux ~]$ module load IsoNet
 
[illya@rockylinux ~]$ mkdir tomoset
[illya@rockylinux ~]$ cd tomoset/
[illya@rockylinux tomoset]$ cp /Public/em/TS*.rec .
[illya@rockylinux tomoset]$ ls -lh
total 96M
-rw-rw-r--. 1 illya illya 43M Nov  8 07:00 TS01-wbp.rec
-rw-rw-r--. 1 illya illya 27M Nov  8 07:00 TS43-wbp.rec
-rw-rw-r--. 1 illya illya 27M Nov  8 07:00 TS45-wbp.rec
[illya@rockylinux tomoset]$
[illya@rockylinux tomoset]$ cd ..
[illya@rockylinux ~]$ isonet.py prepare_star tomoset --output_star hiv_tomo.star --pixel_size 10.8
 
[illya@rockylinux ~]$ ls -l hiv_tomo.star
-rw-rw-r--. 1 illya illya 303 Nov  8 07:02 hiv_tomo.star
 
[illya@rockylinux ~]$ cat hiv_tomo.star
 
data_
 
loop_
_rlnIndex #1
_rlnMicrographName #2
_rlnPixelSize #3
_rlnDefocus #4
_rlnNumberSubtomo #5
_rlnMaskBoundary #6
1       tomoset/TS01-wbp.rec    10.800000       0.000000        100     None
2       tomoset/TS43-wbp.rec    10.800000       0.000000        100     None
3       tomoset/TS45-wbp.rec    10.800000       0.000000        100     None
 
[illya@rockylinux ~]$
 
[illya@rockylinux ~]$ vi hiv_tomo.star
[illya@rockylinux ~]$ cat hiv_tomo.star
 
data_
 
loop_
_rlnIndex #1
_rlnMicrographName #2
_rlnPixelSize #3
_rlnDefocus #4
_rlnNumberSubtomo #5
_rlnMaskBoundary #6
1       tomoset/TS01-wbp.rec    10.800000       38838.257812    100     None
2       tomoset/TS43-wbp.rec    10.800000       25292.275391    100     None
3       tomoset/TS45-wbp.rec    10.800000       30169.785156    100     None
 
[illya@rockylinux ~]$
[illya@rockylinux ~]$ isonet.py deconv hiv_tomo.star --snrfalloff 0.7 --deconv_folder hiv_deconv
11-08 07:05:08, INFO
######Isonet starts ctf deconvolve######
 
11-08 07:05:08, INFO     deconv: tomoset/TS01-wbp.rec| pixel: 10.8| defocus: 3.8838257812000005| snrfalloff:0.7| deconvstrength:1.0
11-08 07:05:10, INFO     time consumed:     1.9011 s
11-08 07:05:10, INFO     deconv: tomoset/TS43-wbp.rec| pixel: 10.8| defocus: 2.5292275391| snrfalloff:0.7| deconvstrength:1.0
11-08 07:05:11, INFO     time consumed:     1.4567 s
11-08 07:05:11, INFO     deconv: tomoset/TS45-wbp.rec| pixel: 10.8| defocus: 3.0169785156| snrfalloff:0.7| deconvstrength:1.0
11-08 07:05:12, INFO     time consumed:     1.1790 s
11-08 07:05:12, INFO
######Isonet done ctf deconvolve######
 
[illya@rockylinux ~]$ ls -l hiv_deconv/
total 391048
-rw-rw-r--. 1 illya illya 178177024 Nov  8 07:05 TS01-wbp.rec
-rw-rw-r--. 1 illya illya 110889524 Nov  8 07:05 TS43-wbp.rec
-rw-rw-r--. 1 illya illya 111361024 Nov  8 07:05 TS45-wbp.rec
[illya@rockylinux ~]$
[illya@rockylinux ~]$ isonet.py make_mask hiv_tomo.star --mask_folder hiv_mask --density_percentage 50 --std_percentage 5
11-08 07:06:04, INFO
######Isonet starts making mask######
 
11-08 07:06:04, INFO     make_mask: hiv_deconv/TS01-wbp.rec| dir_to_save: hiv_mask| percentage: 50.0| window_scale: 4
11-08 07:06:06, INFO     make_mask: hiv_deconv/TS43-wbp.rec| dir_to_save: hiv_mask| percentage: 50.0| window_scale: 4
11-08 07:06:07, INFO     make_mask: hiv_deconv/TS45-wbp.rec| dir_to_save: hiv_mask| percentage: 50.0| window_scale: 4
11-08 07:06:09, INFO
######Isonet done making mask######
 
[illya@rockylinux ~]$
[illya@rockylinux ~]$ cat hiv_tomo.star
 
data_
 
loop_
_rlnIndex #1
_rlnMicrographName #2
_rlnPixelSize #3
_rlnDefocus #4
_rlnNumberSubtomo #5
_rlnMaskBoundary #6
_rlnSnrFalloff #7
_rlnDeconvStrength #8
_rlnDeconvTomoName #9
_rlnMaskDensityPercentage #10
_rlnMaskStdPercentage #11
_rlnMaskName #12
1       tomoset/TS01-wbp.rec    10.800000       38838.257812    100     None    0.700000        1.000000        hiv_deconv/TS01-wbp.rec         50.000000       5.000000   hiv_mask/TS01-wbp_mask.mrc
2       tomoset/TS43-wbp.rec    10.800000       25292.275391    100     None    0.700000        1.000000        hiv_deconv/TS43-wbp.rec         50.000000       5.000000   hiv_mask/TS43-wbp_mask.mrc
3       tomoset/TS45-wbp.rec    10.800000       30169.785156    100     None    0.700000        1.000000        hiv_deconv/TS45-wbp.rec         50.000000       5.000000   hiv_mask/TS45-wbp_mask.mrc
 
[illya@rockylinux ~]$
 
[illya@rockylinux ~]$ isonet.py extract hiv_tomo.star
11-08 07:07:07, INFO     [isonet.py:287]
######Isonet starts extracting subtomograms######
 
11-08 07:07:07, INFO     [prepare.py:37] Extract from deconvolved tomogram hiv_deconv/TS01-wbp.rec
11-08 07:07:08, INFO     [prepare.py:37] Extract from deconvolved tomogram hiv_deconv/TS43-wbp.rec
11-08 07:07:10, INFO     [prepare.py:37] Extract from deconvolved tomogram hiv_deconv/TS45-wbp.rec
11-08 07:07:11, INFO     [isonet.py:304]
######Isonet done extracting subtomograms######
 
[illya@rockylinux ~]$
[illya@rockylinux ~]$ isonet.py refine subtomo.star --gpuID 0 --iterations 30 --noise_start_iter 10,15,20,25
11-08 07:16:45, INFO
######Isonet starts refining######
 
11-08 07:16:47, INFO     Start Iteration1!
11-08 07:16:52, INFO     Noise Level:0.0
11-08 07:28:10, INFO     Done preparing subtomograms!
11-08 07:28:10, INFO     Start training!
11-08 07:28:11, INFO     Loaded model from disk
11-08 07:28:11, INFO     begin fitting
 :
 :
OOM when allocating tensor with shape
 :

途中で落ちた. batch_sizeを変更する必要があるようで、変更方法は「isonet.py refine -h」で確認できる

GUIもあるようで

[illya@rockylinux ~]$ module use --append /apps/modulefiles
[illya@rockylinux ~]$ module load IsoNet
 
[illya@rockylinux ~]$ isonet.py gui

2022y11m08d_071902692.png


トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2022-11-09 (水) 07:02:27 (19d)