本家様 https://github.com/kiharalab/Emap2secPlus

condaで環境を作ります.

このサイトではcrYOLOとかで既にanaconda環境が準備されいます. なので下記のみを実行してanaconda環境に移る.

export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
eval "$(pyenv init - --no-rehash)"
export PATH=$PYENV_ROOT/versions/anaconda3-5.3.1/bin/:$PATH
 
(condaが古いと言われたら)
conda update -n base -c defaults conda

その後に Emap2secPlus を準備して、そこにある「requirement.txt」でconda環境、Emap2secPlus実行環境を作ります

[root@c ~]# cd /apps/
[root@c apps]# git clone https://github.com/kiharalab/Emap2secPlus
 
[root@c apps]# cd Emap2secPlus
 
[root@c Emap2secPlus]# ls
evaluate  figures  LICENSE  main.py  Model  ops  prepare_data  process_map  README.md  requirement.txt
 
[root@c Emap2secPlus]# conda create -n Emap python=3.6.9
 
[root@c Emap2secPlus]# source activate Emap
 
(Emap) [root@c Emap2secPlus]# 
(Emap) [root@c Emap2secPlus]# which pip
/apps/pyenv/versions/anaconda3-5.3.1/envs/Emap/bin/pip
 
(Emap) [root@c Emap2secPlus]# pip install -r ./requirement.txt

EnvironmentModules

「/etc/modulefiles/Emap2secPlus」

#%Module1.0
set          root       /apps/pyenv/versions/anaconda3-5.3.1/envs/Emap
setenv       CRYOLOPATH $root
prepend-path PATH       $root/bin:/apps/Emap2secPlus

使う

[illya@c ~]$ module load Emap2secPlus
 
[illya@c ~]$ python3 /apps/Emap2secPlus/main.py -h
usage: main.py [-h] -F F --mode MODE [--resize RESIZE] [-P P] [-M M]
               [--type TYPE] [--gpu GPU] [--class CLASS]
               [--batch_size BATCH_SIZE] [--contour CONTOUR]
               [--cardinality CARDINALITY] [--drop_rate DROP_RATE]
               [--fold FOLD]
 
optional arguments:
  -h, --help            show this help message and exit
  -F F                  map path
  --mode MODE           0: Predict structures for EM MAP 1: Predict structures
                        for EM maps with pdb structure 2: Predict structure
                        for experimental maps with 4 models 3: Predict and
                        evaluate structure for experimental maps with 4 models
  --resize RESIZE       0: resizing maps with numba optimized (some maps size
                        are not supported); 1: resizing maps with scipy
                        (relatively slow but support almost all maps).
  -P P                  PDB path for evaluating Model's performance
  -M M                  Trained model path which saved all the trained models
  --type TYPE           0:simulated map at 6 A 1: simulated map at 10 A 2:
                        simulated map at 6-10 A 3:experimental map
  --gpu GPU             gpu id choose for training
  --class CLASS         number of classes
  --batch_size BATCH_SIZE
                        batch size for training
  --contour CONTOUR     Contour level for real map
  --cardinality CARDINALITY
                        ResNeXt cardinality
  --drop_rate DROP_RATE
                        Drop out rate for the phase2 Model
  --fold FOLD           specify the fold Model used for predicting the real
                        map
[illya@c ~]$

いちいち「python3 /apps/Emap2secPlus/main.py」と実行するのが面倒なら

[root@c ~]# sed -i '1s/^/#!\/usr\/bin\/env python3\n/' /apps/Emap2secPlus/main.py
 
[root@c ~]# chmod +x /apps/Emap2secPlus/main.py

で「main.py」のみで実行できる. けど....名前が「main.py」って微妙..他でも使われそうな名称で..


トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2021-09-30 (木) 02:18:27 (20d)