過去ページ KAMO20220728
本家様 https://github.com/keitaroyam/yamtbx/blob/master/doc/kamo-ja.md
[root@centos7 ~]# mkdir -p /apps
[root@centos7 ~]# cd /apps/
[root@centos7 apps]# tar xf /Public/em/ccp4-8.0.002-linux64.tar.gz
[root@centos7 apps]# cd ccp4-8.0/
[root@centos7 ccp4-8.0]# ./BINARY.setup
:
:
Before running CCP4 programs from command line,
source bin/ccp4.setup-sh
(or bin/ccp4.setup-csh if you use csh).
[root@centos7 ccp4-8.0]#
これで完了ですが、環境変数を有効にしておきます
[root@centos7 ccp4-8.0]# source bin/ccp4.setup-sh
[root@centos7 ~]# yum install epel-release
[root@centos7 ~]# yum install R-core R-core-devel
[root@centos7 ~]# R
:
:
> install.packages("rjson")
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
Warning message:
package ‘rjson’ is not available (for R version 3.6.0)
>
と言われる。CRANで提供している rjsonパッケージは現在 version 0.2.21 である
https://cran.ism.ac.jp/web/packages/rjson/index.html
これは「R (≥ 4.0.0)」対応なので CentOS7のepelリポジトリからインストールされるR(3.6.0)には対応していないご様子である.
アーカイブを探してひとつ前の「rjson_0.2.20.tar.gz」なら R-3.6.0 にも対応していた(>= 3.1.0)。
対応としてはこの「rjson_0.2.20.tar.gz」を入れるか、Rを最新版にするかとなる。
ここでは古い「rjson_0.2.20.tar.gz」を入れて回避してみる
[root@centos7 ~]# wget https://cran.r-project.org/src/contrib/Archive/rjson/rjson_0.2.20.tar.gz
[root@centos7 ~]# R
:
> install.packages("./rjson_0.2.20.tar.gz",repos=NULL)
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘rjson’ ...
** package ‘rjson’ successfully unpacked and MD5 sums checked
** using staged installation
:
* DONE (rjson)
Making 'packages.html' ... done
>
> installed.packages() <-- 確認
:
rjson "yes" "3.6.0"
:
> q()
Save workspace image? [y/n/c]: n
[root@centos7 ~]#
[root@centos7 ~]# mkdir -p /apps/src
[root@centos7 ~]# cd /apps/src/
[root@centos7 src]# wget https://xds.mr.mpg.de/XDS-INTEL64_Linux_x86_64.tar.gz
[root@centos7 src]# tar xf XDS-INTEL64_Linux_x86_64.tar.gz -C /apps
[root@centos7 src]# mv /apps/XDS-INTEL64_Linux_x86_64 /apps/xds
[root@centos7 src]# cd /apps/xds
[root@centos7 xds]# ls -CF
2cbf* forkxds* mcolspot_par* mintegrate* pix2lab* xdsconv* xscale*
cellparm* mcolspot* merge2cbf* mintegrate_par* xds* xds_par* xscale_par*
[root@centos7 xds]# git clone https://github.com/legrandp/xdsme
[root@centos7 xds]# cd xdsme/
[root@centos7 xdsme]# which python2
/usr/bin/python2
[root@centos7 xdsme]# python2 --version
Python 2.7.5
[root@centos7 xdsme]# ./compile.sh
:
[root@centos7 xdsme]# ls -CF bin/
Darwin_i386@ Linux_i586@ noarch/
[root@centos7 xdsme]# ls -CF bin/noarch/
2pck.py@ dnz2xds.pyc runxds.py@ xdsHKLinfos.pyc xio_info@
2pck.pyc mos2dnz.py@ runxds.pyc xdslog.py@ XIO_info.py@
check_bgk.py@ mos2dnz.pyc xds2dnz.py@ xdslog.pyc XIO_info.pyc
check_bgk.pyc mos2xds.py@ xds2dnz.pyc xdsme@ XOalign.py@
daccor.py@ mos2xds.pyc xds2mos.py@ xds_phiRotationAxis.py@ XOalign.pyc
daccor.pyc oxford2adsc.py@ xds2mos.pyc xds_phiRotationAxis.pyc XOcompare.py@
diffxdsinp.py@ oxford2adsc.pyc xdsauto.py@ XDS.py@ XOcompare.pyc
diffxdsinp.pyc resumxds.py@ xdsauto.pyc XDS.pyc xscale2.py@
dnz2mos.py@ resumxds.pyc xdsconv.py@ xdsreport@ xscale2.pyc
dnz2mos.pyc run_xds2aimless.sh* xdsconv.pyc XIO_collect_info.py@ xscale.py@
dnz2xds.py@ run_xds2staraniso.sh* xdsHKLinfos.py@ XIO_collect_info.pyc xscale.pyc
[root@centos7 xdsme]#
他のアプリ
参照先 https://strucbio.biologie.uni-konstanz.de/xdswiki/index.php/Installation
参照先の「get_folder.sh」の内容から xds_extra_linux.tar (47MB) を取得します
[root@centos7 ~]# cd /apps/src/
[root@centos7 src]# wget https://wiki.uni-konstanz.de/pub/linux_bin/xds_extra_linux.tar
[root@centos7 src]# mkdir /apps/xtal
[root@centos7 src]# tar xf xds_extra_linux.tar -C /apps/xtal/
[root@centos7 src]# ls -CF /apps/xtal/
adxv* get_folder.sh* README.durin xds_nonisomorphism* xscale_maxcc12*
checkcentering* h5dump* README.xds-zcbf xdsstat* xxdiff.qt4*
dectris-neggia.so* H5ToXds* spot2pdb* XDS-viewer* xxdiff.qt5*
durin-plugin.so* hdf2mini-cbf* xdscc12* XDS-viewer.qt4*
eiger2cbf* nxds_getcc* xdsgui* xds-zcbf.so*
generate_XDS.INP* README.dectris-neggia xdsgui.qt4* xscale_isocluster*
[root@centos7 src]#
adxv、dectris-neggia.so とか H5ToXds が入っていることに驚く
追加パッケージと修正を施す
[root@centos7 ~]# yum install hdf5
[root@centos7 ~]# mv /apps/xtal/H5ToXds /apps/xtal/H5ToXds.orig
[root@centos7 ~]# vi /apps/xtal/H5ToXds
#!/bin/sh
eiger2cbf $@ 2>/dev/null
[root@centos7 ~]# chmod +x /apps/xtal/H5ToXds
xdsや関連アプリ向けのEnvironmentModulesを用意する
[root@centos7 ~]# vi /apps/modulefiles/xtal
#%Module1.0
prepend-path PATH /apps/xds:/apps/xds/xdsme/bin/noarch:/apps/xtal
[root@centos7 ~]#
以前はpythonの関係でDIALS 2.2とかに制限されてましたが、現在はない模様
本家様 https://dials.github.io/, git https://github.com/dials/dials/
[root@centos7 ~]# cd /apps/src/
[root@centos7 src]# wget https://github.com/dials/dials/releases/download/v3.14.2/dials-v3-14-2-linux-x86_64.tar.xz
[root@centos7 src]# tar xf dials-v3-14-2-linux-x86_64.tar.xz
[root@centos7 src]# cd dials-installer/
[root@centos7 dials-installer]# ./install --prefix=/apps
利用するには「/apps/dials-v3-14-2/dials_env.sh」を読み込む必要がある
ここでは EnvironmentModules でアプリ管理をするので調査してmodule fileを作ってみた
[root@centos7 ~]# vi /apps/modulefiles/DIALS
#%Module
set dials /apps/dials-v3-14-2
setenv DIALS $dials
setenv DIALS_VERSION v3-14-2
prepend-path PATH $dials/build/bin
[root@centos7 ~]#
DIALSのEnvironmentModules を有効にして作業を進めます
[root@centos7 ~]# module use --append /apps/modulefiles
[root@centos7 ~]# module load DIALS
[root@centos7 ~]# cd $DIALS/build
[root@centos7 build]# pwd
/apps/dials-v3-14-2/build
[root@centos7 build]# ./bin/libtbx.python -mpip install networkx
[root@centos7 build]# cd $DIALS/modules
[root@centos7 modules]# pwd
/apps/dials-v3-14-2/modules
[root@centos7 modules]# git clone https://github.com/keitaroyam/yamtbx.git
[root@centos7 modules]# cd $DIALS/build
[root@centos7 build]# pwd
/apps/dials-v3-14-2/build
[root@centos7 build]# ./bin/libtbx.configure yamtbx
っでできたかなのテスト
(別のshellを立ち上げて)
[root@centos7 ~]# module use --append /apps/modulefiles
[root@centos7 ~]# module load DIALS ccp4/8.0 xtal
[root@centos7 ~]# which kamo.test_installation
/apps/dials-v3-10-2/build/bin/kamo.test_installation
[root@centos7 ~]# kamo.test_installation
Testing installation of KAMO.
If you have trouble, please report the issue including all outputs:
Info:
Python: 3.9.13
Exec: /apps/dials-v3-10-2/build/../conda_base/bin/python
Platform: Linux-3.10.0-1160.71.1.el7.x86_64-x86_64-with-glibc2.17
Testing location..
/apps/dials-v3-10-2/modules/yamtbx/yamtbx. OK
Testing R..
OK
Testing NumPy..
1.22.4 installed. OK
Testing SciPy..
1.8.1 installed. OK
Testing networkx..
2.8.5 installed. OK
Testing Matplotlib..
3.5.2 installed. OK
Testing wxPython..
4.1.1 gtk2 (phoenix) wxWidgets 3.1.5 installed. OK
Testing XDS..
OK
Testing XDSSTAT..
OK
Testing ccp4..
OK
Testing dials (package)..
DIALS 3.10.2-g3ecfd29bc-release
Python 3.9.13
Installed in: /apps/dials-v3-14-2/modules/dials/src/dials
OK
Testing dials (module)..
DIALS 3.10.2-g3ecfd29bc-release installed. OK
Testing eiger hdf5 geometry recognition..
FormatHDFEigerNearlyNexus does not exist. This implies h5-recorded geometry can be no longer extracted using dxtbx. I hope it works. OK
Testing Adxv..
OK
Testing H5ToXds..
Traceback (most recent call last):
File "/apps/dials-v3-14-2/build/../modules/yamtbx/yamtbx/command_line/kamo_test_installation.py", line 367, in run
ret = f()
File "/apps/dials-v3-14-2/build/../modules/yamtbx/yamtbx/command_line/kamo_test_installation.py", line 84, in tst_h5toxds
master_h5 = make_dummy_h5_for_test(tmpdir, data)
File "/apps/dials-v3-14-2/modules/yamtbx/yamtbx/dataproc/eiger.py", line 293, in make_dummy_h5_for_test
create_data_file(os.path.join(wdir, "test_data_000001.h5"), data, None, 1, 1, compression="bslz4")
File "/apps/dials-v3-14-2/modules/yamtbx/yamtbx/dataproc/eiger.py", line 270, in create_data_file
dataset = compress_h5data(h5, "/entry/data/data", data, chunks, compression)
File "/apps/dials-v3-14-2/modules/yamtbx/yamtbx/dataproc/eiger.py", line 237, in compress_h5data
import bitshuffle.h5
ModuleNotFoundError: No module named 'bitshuffle'
1 Failures (tst_h5toxds)
[root@centos7 ~]#
どうやら H5ToXds でエラーが発生した模様. 「ModuleNotFoundError: No module named 'bitshuffle'」なのでこのbitshuffleを追加します
[root@centos7 ~]# libtbx.python -mpip install bitshuffle
っで再度テストを実行すると
[root@centos7 ~]# kamo.test_installation
:
Testing Adxv..
OK
Testing H5ToXds..
OK
All OK!
[root@centos7 ~]#
となり完成
テスト起動
module load DIALS ccp4 xtal
kamo bl=32xu batch.engine=sh