Relion Installation on GoToCloud
Contents
Log in to your AWS account with administrator and create ParallelCluster.
For more information, see: https://sites.google.com/sbrc.jp/gotocloud-doc/procedure
[2024/10/02 Developer's Note] When updating EFS in the KEK system, Cloud9 should be created in the usr-vpc as per the hands-on instructions. Only kek901 is peered with the master-vpc, allowing updates to the master-EFS. Ideally, it should be named something like master-operate-vpc, rather than usr-vpc.
Search for EC2 service in search window and navigate to EC2 service page.
Select "Instances" form menues on the left.
Select the head node created in procedure 1.1. and select "Actions", "Security" and "Modify IAM role" in that order from the top right box.
Choose "EFSWriteAccessRole"and click "Update IAM role".
Connect to head node of Cloud9 created above.
Unmount the shared EFS mounted on the HeadNode with no write permissions.
Mount master of shared EFS with write permission.
$ gtc_pcluster_ssh.sh
$ sudo umount /efs
$ sudo mount -t efs -o tls,iam,mounttargetip=[mount target IP address] [master of shared EFS ID] /efs
Example of KEK's GoToCloud platform.
$ gtc_pcluster_ssh.sh
$ sudo umount /efs
$ sudo mount -t efs -o tls,iam,mounttargetip=10.0.10.180 fs-0a1234b56789 /efs
The following instructions assume that anaconda are available.
Connect to head node via ssh.
$ cd /efs/em
$ git clone https://github.com/pyenv/pyenv
$ export PYENV_ROOT=/efs/em/pyenv
$ export PATH=$PYENV_ROOT/bin:$PATH
$ pyenv install --list
$ pyenv install anaconda3-2023.03
$ pyenv versions
system
* anaconda3-2023.03 (set by /efs/em/pyenv/version)
$ pyenv global anaconda3-2023.03
$ pyenv version
anaconda3-2023.03 (set by /efs/em/pyenv/version)
$ export PATH=$PYENV_ROOT/versions/anaconda3-2023.03/bin/:$PATH
How to uninstall pyenv (as necessary)
$ rm -rf pyenv
How to uninstall anaconda (as necessary)
$ pyenv uninstall anaconda3-2023.03
You can set Relion default version.
Create the version file directly under the directory where the module file exists.
$ cd /efs/em/modulefiles/relion/
$ cat > .version
##### Copy and paste from below #####
#%Module 1.0
set ModulesVersion 4.0.1-pc3.7.0
##### to above #####
$ cd 4.0.1-pc3.7.0
$ cat > .version
##### Copy and paste from below #####
#%Module 1.0
set ModulesVersion intel_amd-gcc-intelmpi-gpu
##### to above #####
Connect to head node via ssh.
$ cd /efs/em/
$ git clone https://github.com/KEK-SBRC-CryoEM/gotocloud.git
$ cp -r gotocloud/gtc_sh ./
$ cd /efs/em/
$ cp -r gotocloud/submission_script/* ./
Note: Copy files only
$ cd /efs/em/
$ cp -r gotocloud/test_schemes ./
See here how to use test schemes.
$ cd /efs/em/
$ cp -r gotocloud/schemes_creator_sh ./
$ cd /efs/em/
$ rm -rf gotocloud
If you have not installed pyenv and anaconda, perform step2. before installing crYOLO.
The following instructions assume that anaconda are available.
Connect to head node via ssh.
$ cd /efs/em/
$ export PYENV_ROOT=/efs/em/pyenv
$ export PATH=$PYENV_ROOT/bin:$PATH
$ pyenv versions
system
* anaconda3-2023.03 (set by /efs/em/pyenv/version)
$ pyenv global anaconda3-2023.03
$ pyenv version
anaconda3-2023.03 (set by /efs/em/pyenv/version)
$ export PATH=$PYENV_ROOT/versions/anaconda3-2023.03/bin/:$PATH
create conda environment and install cryolo
$ conda create -n cryolo-1.9.6 -c conda-forge -c anaconda pyqt=5 python=3 numpy=1.18.5 libtiff wxPython=4.1.1 adwaita-icon-theme 'setuptools<66'
$ source activate cryolo-1.9.6
$ pip install nvidia-pyindex
$ pip install 'cryolo[c11]==1.9.6'
$ conda deactivate
・When conda create takes too long time
Change the package solver of conda to libmamba.
cf. https://www.anaconda.com/blog/a-faster-conda-for-a-growing-community
$ conda install -n base conda-libmamba-solver
$ conda config --set solver libmamba
<Just in case> How to remove conda environment
$ export PYENV_ROOT=/efs/em/pyenv
$ export PATH=$PYENV_ROOT/bin:$PATH
$ export PATH=$PYENV_ROOT/versions/anaconda3-2023.03/bin/:$PATH
$ conda env remove --name cryolo-1.9.6
Create module file.
$ cd /efs/em/modulefiles/crYOLO
$ cat > 1.9.6
#%Module -*- tcl -*-
set root /efs/em/pyenv/versions/anaconda3-2023.03/envs/cryolo-1.9.6
setenv CRYOLOPATH $root
prepend-path PATH $root/bin
setenv CRYOLO_SUBMIT_CMD sbatch
setenv CRYOLO_SUBMIT_SCRIPT /efs/em/aws_slurm_cryolo.sh
[CONTROL+C]
Setup default version.
$ cd /efs/em/modulefiles/crYOLO/
$ cat > .version
#%Module 1.0
set ModulesVersion 1.9.6
[CONTROL+C]
$ cd /efs/em/cryolo
$ mkdir models
Download all general models for crYOLO to head node from here. It is recommended to connect to head node via niceDCV and download from firefox via http.
Move all models for crYOLO to "/efs/em/cryolo/models" derectory
$ mv /path/to/model /efs/em/cryolo/models/
Create symbolic links for each models
$ ln -s /efs/em/cryolo/models/gmodel_phosnet_202005_N63_c17.h5 /efs/em/cryolo/gmodel_phosnet_lpf_link.h5
$ ln -s /efs/em/cryolo/models/gmodel_phosnet_202005_nn_N63_c17.h5 /efs/em/cryolo/gmodel_phosnet_denoise_link.h5
$ ln -s /efs/em/cryolo/models/gmodel_phosnet_negstain_20190226.h5 /efs/em/cryolo/gmodel_phosnet_negstain_link.h5
$ cd /efs/em/
$ git clone https://github.com/KEK-SBRC-CryoEM/gotocloud.git
$ cp -r gotocloud/cryolo ./
How to use python scripts to run crYOLO in Relion external job.
Launch Relion GUI.
Select "External" from job list on the left.
Enter the following in the "Input" tabs.
External executable: /efs/em/cryolo/gtf_relion4_run_cryolo_system.sh
Input micrographs: [path to micrographs.star file]
Enter the following in the "Params" tabs.
Param1 label, value: cryolo_repo, /efs/em/crYOLO
Param2 label, value: threshold, [threshold for cryolo]
Param2 label, value: device, [GPU ID (which GPUs to use) e.g. 0:1:2:3:4:5:6:7]
Enter the following in the "Running" tabs
Number of thread: 1
Submit to queue: Yes
Queue name: optional
Queue submit command: sbatch
Partition: [Partition name (e.g. g5-vcpu192-gpu8)]
Standard submission script: [submission script to use (e.g. /efs/em/aws_slurm_relion.sh)]
Minimum dedicated cores per node: 1
Click ”Run!"
Not required if Relion version 5 is installed, as Topaz will be installed when Relion is installed.
If you have not installed pyenv and anaconda, perform step2. before installing Topaz.
Connect to head node.
If continuing from 3.1., the following is not required.
$ cd /efs/em/
$ export PYENV_ROOT=/efs/em/pyenv
$ export PATH=$PYENV_ROOT/bin:$PATH
$ pyenv versions
system
* anaconda3-2023.03 (set by /efs/em/pyenv/version)
$ pyenv global anaconda3-2023.03
$ pyenv version
anaconda3-2023.03 (set by /efs/em/pyenv/version)
$ export PATH=$PYENV_ROOT/versions/anaconda3-2023.03/bin/:$PATH
create conda environment and install Topaz
$ conda create -n topaz-0.2.5 python=3.6
$ source activate topaz-0.2.5
$ conda install topaz -c tbepler -c pytorch
$ conda deactivate
Create module file for Topaz
$ cd /efs/em/modulefiles/Topaz
$ cat > 0.2.5
#%Module -*- tcl -*-
set root /efs/em/pyenv/versions/anaconda3-2023.03/envs/topaz-0.2.5
prepend-path PATH $root/bin
Setup default version
$ cd /efs/em/modulefiles/Topaz/
$ cat > .version
##### Copy and paste from below #####
#%Module 1.0
set ModulesVersion 0.2.5
##### to above #####
Connect to head node via niceDCV.
Open the Firefox Web Browser
Open the following web page.
https://grigoriefflab.umassmed.edu/ctf_estimation_ctffind_ctftilt
Download the latest version of ctffind-4 for linux64.
(KEK has confirmed that 'ctffind-4.1.14-linux64.tar.gz' is available)
If you cannot download installer directly to the head node from the ubuntu web browser, upload installer to the head node by referring to
method 1 here.
Open the terminal and run following commands.
$ cd /efs/em
$ mkdir ctffind-4.1.14-linux64
$ cd ctffind-4.1.14-linux64
$ cp ~/Downloads/ctffind-4.1.14-linux64.tar.gz ./
$ tar -zxf ctffind-4.1.14-linux64.tar.gz
Connect to head node via niceDCV.
Open the Firefox Web Browser
Open the following web page.
https://www.cgl.ucsf.edu/chimera/download.html
Download the latest version of Chimera installer for Linux 64-bit
(KEK has confirmed that 'chimera-1.15-linux_x86_64.bin' is available)
If you cannot download installer directly to the head node from the ubuntu web browser, upload installer to the head node by referring to
method 1 here.
Open the terminal and run command.
$ chmod +x chimera-1.15-linux_x86_64.bin
$ ./chimera-1.15-linux_x86_64.bin
Enter install location: /efs/em/UCSF-Chimera64-1.15 # Input Installation destination
Create module file for chimera
$ cd /efs/em/modulefiles/
$ mkdir chimera
$ cd chimera
$ cat > 1.15
#%Module1.0
set-alias chimera /efs/em/UCSF-Chimera64-1.15rc/bin/chimera
Setup default version
$ cd /efs/em/modulefiles/chimera/
$ cat > .version
#%Module 1.0
set ModulesVersion 1.15
$ cd /efs/em/
$ git clone https://github.com/KEK-SBRC-CryoEM/gotocloud.git
$ cp -r gotocloud/select_class3d ./
How to use python scripts to select class3d map in Relion external job.
Launch Relion GUI.
Select "External" from job list on the left.
Enter the following in the "Input" tab.
External executable: /efs/em/pyenv/versions/anaconda3-5.3.1/envs/cryolo-1.8.0/bin/python /fsx/GoToFly/SelectClass3D/gtf_relion4_run_select_class3d.py
Input particles: [Path to Class3D result file]
All fields should be blank in the "Params" tab.
Enter the following in the "Running" tab.
Number of thread: 1
Submit to queue: No
Click ”Running".