#author("2020-10-24T02:41:16+00:00","default:sysosa","sysosa") #author("2020-10-24T02:44:55+00:00","default:sysosa","sysosa") 本家様 [[https://github.com/bHimes/emClarity>+https://github.com/bHimes/emClarity]] [[https://www.ncbi.nlm.nih.gov/pubmed/30349041>+https://www.ncbi.nlm.nih.gov/pubmed/30349041]] MATLABなアプリ。ソースコードが公開されてMATLABを持っていればコンパイル可能な代物 だが、コンパイル済みのバイナリーも提供されている。なので無償のMATLAB Compiler Runtime (MCR)が用意できれば利用可能です。 この「MATLAB Compiler Runtime (MCR)」は[[https://jp.mathworks.com/products/compiler/matlab-runtime.html>+https://jp.mathworks.com/products/compiler/matlab-runtime.html]]から入手可能です。 っで、いろいろな種類のRuntimeがあるが、emClarityの「LTS 1.5.1.0」バージョンは「MCR_2019a」のみでしか動かないみたい ***MATLAB Runtimeのインストール [#p8bee946] 先の[[https://jp.mathworks.com/products/compiler/matlab-runtime.html>+https://jp.mathworks.com/products/compiler/matlab-runtime.html]]からRelease R2019a (9.6)のLinux-bit をクリックします。 ダウンロードされるファイルは「MATLAB_Runtime_R2019a_Update_8_glnxa64.zip」で 2.0 GB あります &ref(2020y05m20d_234548054.png,nolink); インストール方法は [[MATLAB]] 参照 ***emClarity(MATLAB コンパイル済み版)を入手 [#j368aa33] emClarityのwikiページに移って[[https://github.com/bHimes/emClarity/wiki>+https://github.com/bHimes/emClarity/wiki]] 「LTS 1.5.1.0」のリンクをクリックします。 &ref(2020y10m24d_095309439.png,nolink); リンクをクリックすると google drive に移ります。そこでダウンロードリンクをクリックします。 &ref(2020y10m24d_095450476.png,nolink); これでファイル「emClarity_1.5.1.0.zip」(265MB)が取得できます。 これを配置します。 #code(nonumber){{ [root@c ~]# cd /apps [root@c apps]# unzip /apps/src/emClarity_1.5.1.0.zip }} 展開される中身は #code(nonumber){{ [root@c apps]# cd emClarity_1.5.1.0 [root@c emClarity_1.5.1.0]# ls -CF bin/ docs/ lib/ [root@c emClarity_1.5.1.0]# ls -lF bin/ total 51880 drwxr-xr-x 5 root root 190 Jun 11 05:32 deps/ -rwxr--r-- 1 root root 53115000 Jun 11 20:01 emClarity_1_5_1_0* -rwxr-xr-x 1 root root 4350 Jun 11 20:01 emClarity_1_5_1_0_v19a* [root@c emClarity_1.5.1.0]# }} 「emClarity_1_5_1_0」に実行権が入ってないので「chmod +x emClarity_1_5_1_0」とします #code(nonumber){{ [root@c emClarity_1.5.1.0]# chmod +x emClarity_1_5_1_0 }} その他に配布ディレクトリを見てみると #code(nonumber){{ [root@c emClarity_1.5.1.0]# ls -lF bin/deps/ total 167008 drwxr-xr-x 2 root root 4096 Apr 19 2020 autodoc/ drwxr-xr-x 3 root root 21 Apr 18 2020 bin/ -rw-r--r-- 1 root root 31 Apr 18 2020 cisTEMDeps.txt drwxr-xr-x 2 root root 4096 Apr 18 2020 com/ -rwxr-xr-x 1 root root 55563272 Apr 18 2020 emC_ctffind* lrwxrwxrwx 1 root root 48 Oct 24 10:12 emC_reconstruct3d -> /groups/grigorieff/home/himesb/tmp/reconstruct3d -rwxr-xr-x 1 root root 57561952 Apr 18 2020 emC_reconstruct3d~* -rwxr-xr-x 1 root root 57860976 Apr 18 2020 emC_refine3d* -rw-r--r-- 1 root root 182 Apr 18 2020 imodDeps.txt -rw-r--r-- 1 root root 8 Apr 18 2020 VERSION [root@c emClarity_1.5.1.0]# }} 「emC_reconstruct3d」がリンクファイルなのだが、参照先が??。おそらく「emC_reconstruct3d~」と差し替えが必要なのでは?と思う #code(nonumber){{ [root@c emClarity_1.5.1.0]# rm bin/deps/emC_reconstruct3d [root@c emClarity_1.5.1.0]# mv bin/deps/emC_reconstruct3d~ bin/deps/emC_reconstruct3d [root@c emClarity_1.5.1.0]# ls -lF bin/deps/ total 167008 drwxr-xr-x 2 root root 4096 Apr 19 2020 autodoc/ drwxr-xr-x 3 root root 21 Apr 18 2020 bin/ -rw-r--r-- 1 root root 31 Apr 18 2020 cisTEMDeps.txt drwxr-xr-x 2 root root 4096 Apr 18 2020 com/ -rwxr-xr-x 1 root root 55563272 Apr 18 2020 emC_ctffind* -rwxr-xr-x 1 root root 57561952 Apr 18 2020 emC_reconstruct3d* -rwxr-xr-x 1 root root 57860976 Apr 18 2020 emC_refine3d* -rw-r--r-- 1 root root 182 Apr 18 2020 imodDeps.txt -rw-r--r-- 1 root root 8 Apr 18 2020 VERSION [root@c emClarity_1.5.1.0]# }} あと「bin/deps/autodoc/」にリンク参照先がないファイルが多数あるが....そのままに. ***設定 [#q3fdf8a7] 一部修正する必要がある. まずは、MATLAB Runtimeのインストール時に提示される runtime の LD_LIBRARY_PATH を定義するファイルを用意する &size(0){既に 「/etc/ld.conf.d/」 とかで定義されているかもしれないけど....}; そのためのファイル「/apps/MATLAB/mcr_bash.sh」を用意します #code(nonumber){{ [root@c ~]# cat /apps/MATLAB/mcr_bash.sh _LD_LIBRARY_PATH=/apps/MATLAB/MATLAB_Runtime/v96/runtime/glnxa64 _LD_LIBRARY_PATH=${_LD_LIBRARY_PATH}:/apps/MATLAB/MATLAB_Runtime/v96/bin/glnxa64 _LD_LIBRARY_PATH=${_LD_LIBRARY_PATH}:/apps/MATLAB/MATLAB_Runtime/v96/sys/os/glnxa64 _LD_LIBRARY_PATH=${_LD_LIBRARY_PATH}:/apps/MATLAB/MATLAB_Runtime/v96/extern/bin/glnxa64 export LD_LIBRARY_PATH=${_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH} [root@c ~]# }} そして「/apps/emClarity_1.5.1.0/bin/emClarity_1_5_1_0_v19a」を修正します #code(diff,nonumber){{ --- /apps/emClarity_1.5.1.0/bin/emClarity_1_5_1_0_v19a.orig 2020-06-11 20:01:17.000000000 +0900 +++ /apps/emClarity_1.5.1.0/bin/emClarity_1_5_1_0_v19a 2020-10-24 11:00:42.881094027 +0900 @@ -7,12 +7,12 @@ #Please modify this line to point to the text file in your MCR root #where you pasted the lines suggested to add to LD_LIBRARY_PATH during install. #MCR_BASH="/work/thirdParty/MATLAB/mcr_bash.sh" -MCR_BASH=/groups/grigorieff/home/himesb/thirdParty/MTL_MCR_17b/BH_mcr_internal19a.bashrc +MCR_BASH=/apps/MATLAB/mcr_bash.sh #Please modify this line to point to the install for emClarity binary #emClarity_ROOT=/work/emClarity -export emClarity_ROOT=/groups/grigorieff/home/himesb/work/emClarity +export emClarity_ROOT=/apps/emClarity_1.5.1.0 export LD_LIBRARY_PATH=${emClarity_ROOT}/lib:${LD_LIBRARY_PATH} # This is added in the middle of the emClarity run script. It does the following. }} この修正後、emClarityが正しく動くかチェックします #code(nonumber){{ [root@c ~]# /apps/emClarity/bin/emClarity_1_5_0_4_v19a check Found tmpfs /dev/shm with max mem 3958548 bytes using this for MCR_CACHE_ROOT ############## Created a tmp MCR_CACHE locally at /dev/shm/emC_tmp_2262012327 Available mem is 3.77517 GB Started emC_memClean to make sure it removed in the event of a crash. Default kill time is a max of 10080 minutes ############## emC_cisTEMDepPath = '/apps/emClarity_1.5.1.0/bin/deps' *************************************** emClarity version 8307477 run starting on 24-Oct-2020 11:31:35 cmd check *************************************** /bin/bash: /apps/emClarity_1.5.1.0/testScripts/BH_checkInstall.sh: No such file or directory *************************************** run ending on 24-Oct-2020 11:31:36 *************************************** [root@c ~]# }} と問題ないみたい. 「BH_checkInstall.sh」は見当たらない... ***EnvironmentModules [#f847621b] 使用するにはIMOD-4.10.18以上が必要なようで、module load の際にはimodも概要以上がloadされるようにするのがいいみたい なので #code(nonumber){{ [root@c ~]# cat /etc/modulefiles/emClarity #%Module1.0 # module unload IMOD module load IMOD/4.10 module load chimera set-alias emClarity /apps/emClarity/bin/emClarity_1_5_1_0_v19a set-alias emClarity /apps/emClarity_1.5.1.0/bin/emClarity_1_5_1_0_v19a [root@c ~]# }} とかに. IMOD/4.10のmodulefileとしては #code(nonumber){{ #%Module1.0 # set imod /apps/imod_4.10.48 # prepend-path PATH $imod/bin prepend-path LD_LIBRARY_PATH $imod/lib prepend-path MANPATH $imod/man setenv IMOD_DIR $imod setenv IMOD_QTLIBDIR $imod/qtlib setenv IMOD_PLUGIN_DIR $imod/lib/imodplug #setenv IMOD_JAVADIR /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/ setenv IMOD_JAVADIR /usr setenv FOR_DISABLE_STACK_TRACE 1 setenv IMOD_CALIB_DIR $imod/autodoc set-alias subm "submfg \!* &" }} とかで.