未完成
本家様https://github.com/williamnwan/STOPGAP
STOPGAP is a MATLAB-based package for subtomogram averaging.
(deepL翻訳:STOPGAPは、サブトモグラム平均化のためのMATLABベースのパッケージです)
STOPGAPはMATLABで作られたアプリのようで、gitにはソースコードと共にMATLABでコンパイルされたバイナリーも提供されています。
なのでMATLABの無償runtime版を取得すれば製品版を購入せずともSTOPGAPを実行できるみたい.
ここではMATLAB runtimeを取得して実装してみます.
https://github.com/wan-lab-vanderbilt/STOPGAP/releasesを読むと 最新版の STOPGAP 0.7.4 は MATLAB R2020b で作られているようなので、
runtime版も R2020bを取得します
取得先はこちらhttps://jp.mathworks.com/products/compiler/matlab-runtime.html
この中から Linux版の R2020b(9.9) を取得します. ファイル名は「MATLAB_Runtime_R2020b_Update_8_glnxa64.zip」(3.0GB)
[root@rockylinux9 ~]# mkdir -p /apps/src/MATLAB_Runtime_R2020b
[root@rockylinux9 ~]# cd /apps/src/MATLAB_Runtime_R2020b
[root@rockylinux9 MATLAB_Runtime_R2020b]# unzip ../src/MATLAB_Runtime_R2020b_Update_8_glnxa64.zip
[root@rockylinux9 MATLAB_Runtime_R2020b]# ./install
GUIなインストーラーが起動します.
インストール先は「/apps/MATLAB/R2020b」として入れました.
途中
LD_LIBRARY_PATHとして
「/apps/MATLAB/R2020b/v99/runtime/glnxa64:/apps/MATLAB/R2020b/v99/bin/glnxa64:/apps/MATLAB/R2020b/v99/sys/os/glnxa64:/apps/MATLAB/R2020b/v99/extern/bin/glnxa64」の定義が求められる
Environment-Modulesでは
「/apps/modulefiles/MATLABruntime」として
#%Module
set M /apps/MATLAB/R2020b/v99
prepend-path PATH $M/bin
prepend-path LD_LIBRARY_PATH $M/runtime/glnxa64:$M/bin/glnxa64:$M/sys/os/glnxa64:$M/extern/bin/glnxa64
とします
次に本体の STOPGAP を取得します
[root@rockylinux9 ~]# cd /apps/
[root@rockylinux9 apps]# git clone https://github.com/wan-lab-vanderbilt/STOPGAP
[root@centos7 ~]# cd /apps/
[root@centos7 apps]# gi clone https://github.com/williamnwan/STOPGAP
[root@centos7 apps]# cd STOPGAP/
[root@centos7 STOPGAP]#
[root@centos7 STOPGAP]# cp compiled_2015b/* exec/lib/ <--- コンパイル済みバイナリーをコピー
[root@centos7 STOPGAP]# chmod +x exec/lib/* <--- 実行権を付与
[root@centos7 STOPGAP]# chmod +x exec/bin/*
[root@centos7 STOPGAP]# vi exec/lib/stopgap_config.sh <-- matlabRootのPATHを指定
:
matlabRoot="/apps/MATLAB/R2015b/v90"
:
[root@centos7 STOPGAP]#
[root@centos7 ~]# vi /apps/modulefiles/STOPGAP
#%Module
module load MATLABruntime
prepend-path MATLABPATH /apps/STOPGAP/sg_toolbox
prepend-path STOPGAPHOME /apps/STOPGAP/exec
[root@centos7 ~]#
実行する際は「/apps/STOPGAP/bash」にあるファイルをコピーして修正して実行する
[root@centos7 ~]# ls /apps/STOPGAP/bash/
run_stopgap.sh stopgap_initialize_folder.sh stopgap_subtomo_parser.sh stopgap_vmap_parser.sh
stopgap_extract_subtomos.sh stopgap_pca_parser.sh stopgap_tm_parser.sh
[root@centos7 ~]#
変更する場所は
「##### RUN OPTIONS #####」の「run_type」. ローカルで実行するなら「local」にする
「##### DIRECTORIES #####」の「rootdir」. subtomogram averaging directoryを示す. あとparamfilename.