P2Rankを用いた蛋白質のポケット探索 | Apptainer on WSL2
※ コードブロック
における 🦐
は、プロンプトを表している
🦐 はじめに
ある蛋白質分子においてリガンド分子 (e.g., 低分子化合物) が結合する領域やくぼみのことを「ポケット」という。
創薬研究において標的蛋白質の構造が手元にあるときに、その蛋白質のligandableな (あるいはdrugableな) ポケットをin silicoで推定したいという要求はままあるだろう (あるよね?)。
世の中には様々なポケット探索ツールがたくさんあるが、今回はオープンソースソフトウェアのなかでも導入しやすく使いがってもよい機械学習ベースの P2Rank
について紹介する。
Ligand binding site prediction from protein structure has many applications related to elucidation of protein function and structure based drug discovery. It often represents only one step of many in complex computational drug design efforts. Although many methods have been published to date, only few of them are suitable for use in automated pipelines or for processing large datasets. These use cases require stability and speed, which disqualifies many of the recently introduced tools that are either template based or available only as web servers.
We present P2Rank, a stand-alone template-free tool for prediction of ligand binding sites based on machine learning. It is based on prediction of ligandability of local chemical neighbourhoods that are centered on points placed on the solvent accessible surface of a protein. We show that P2Rank outperforms several existing tools, which include two widely used stand-alone tools (Fpocket, SiteHound), a comprehensive consensus based tool (MetaPocket 2.0), and a recent deep learning based method (DeepSite). P2Rank belongs to the fastest available tools (requires under 1 s for prediction on one protein), with additional advantage of multi-threaded implementation.
本記事では Apptainer
(旧 Singularity
) を用いた環境構築方法を例として示すが、正直 Apptainer
を使う必要性はないのでご安心を。
以下、本記事を執筆した際の環境。
specifications | |
---|---|
CPU |
Ryzen 7 5700X (AMD) |
グラフィックボード |
GeForce RTX 2080 Ti VENTUS GP OC (MSI) |
メモリ |
DDR4-3200 16 GB×2 (Crucial) |
version | |
---|---|
Windows 10 |
22H2 |
NVIDIA グラフィクス ドライバー |
528.49 |
WSL2 |
1.0.3.0 |
AlmaLinux 8 on WLS2 |
8.7 |
Apptainer |
1.1.5-2.el8 |
WSL2
上の AlmaLinux 8
に Apptainer
環境を構築する手順については、 以下の記事をご参照ください。
Zenn | AlmaLinux 8 on WSL2にApptainer環境 (with GPU) を構築する
🦐 P2Rank実行コンテナの構築
P2Rank
はなんとLinux、macOS、およびWindows向けのバイナリパッケージをGitHubで配布してくれている (Linux
以外のバイナリについては使ったことないけど……)。
バイナリパッケージを利用するための依存環境は Java 8 to 18
および PyMOL ver. 1.7 (or newer)
で、PyMOL
については結果を表示するためなので、実質必要なのは Java 8 to 18
環境である。
以上を踏まえて、任意のディレクトリ (例として ~/apps/apptainer_image/def_file
) にコンテナイメージビルドのための P2Rank.def
を作成する。
BootStrap: docker
From: ubuntu:20.04
%post
# localtime関係のWARNINGに対処
touch /etc/localtime
# リポジトリを富山大学に変更
sed -i.bak -e 's|archive.ubuntu.com|ubuntutym.u-toyama.ac.jp|g' /etc/apt/sources.list
# P2Rankに必要なパッケージのインストール (冗長)
apt update && apt upgrade -y
apt install -y build-essential default-jre curl
# localeにen_US.UTF-8を追加する (WSL2だけで使用するなら不要)
apt install -y locales
locale-gen en_US.UTF-8
# P2Rankのインストールディレクトリの作成
mkdir -p /usr/local/apps
# P2Rankをインストールする
cd /usr/local/apps
curl -L -O https://github.com/rdk/p2rank/releases/download/2.4/p2rank_2.4.tar.gz
tar -xvf ./p2rank_2.4.tar.gz
# P2Rankのlogファイルの出力先を変更
sed -i -e 's|$INSTALL_DIR|$HOME/.p2rank|g' ./p2rank_2.4/prank
# 不要なファイルの削除
rm -f ./p2rank_2.4.tar.gz
%environment
# P2Rank用のPATHを設定
export P2RANK_HOME="/usr/local/apps/p2rank_2.4"
export PATH="${P2RANK_HOME}:${PATH}"
%runscript
# "$@"でprankの引数を利用するための設定
prank "$@"
P2Rank (ver. 2.4)
の仕様として、インストールディレクトリ、つまり /hoge/p2rank_2.4
内に prank.log
というログファイルを出力する (今後の更新で修正予定らしい)。そのまま使用するとコンテナ実行時にコンテナ内への書き込みが生じエラーになるため、~/.p2rank/log
に出力するように改変している。
ちなみに apptainer run
の際に --writable-tmpfs
をつければ改変なしで動く (ただし prank.log
は残らない)。
作成した P2Rank.def
を基に、P2Rank
実行コンテナ P2Rank.sif
を以下のコマンドでビルドする。
# P2Rank.defに基づいてP2Rank実行コンテナイメージをビルド
🦐 cd ~/apps/apptainer_image
🦐 apptainer build ./P2Rank.sif ./def_file/P2Rank.def
以下のように ~/.bashrc
や ~/.zshrc
に alias
を作成しておくと便利。
# P2Rank
export APPTAINER_IMAGE="${HOME}/apps/apptainer_image"
alias prank="apptainer run ${APPTAINER_IMAGE}/P2Rank.sif"
🦐 P2Rankを使ってみる
SARS-CoV-2 3CL proteaseの結晶構造 ( PDB code: 7VU6
) に対して P2Rank
を用いたポケット探索をやってみる。
# 任意の作業ディレクトリに移動
🦐 cd ~/Documents/p2rank/7VU6
# PDBから7VU6の構造をダウンロードする
🦐 curl -O -L http://www.rcsb.org/pdb/files/7vu6.pdb
7vu6.pdb
のA鎖および蛋白質のみを抽出したファイルを 7vu6_A_noHET.pdb
として保存した (今回はテストのためリガンドや水分子を取り除いているが、本来は不要)。
7vu6_A_noHET.pdb
に対して以下のように prank predict
コマンドを用いてポケット探索を実行する。
# P2Rankの実行
🦐 prank predict -f ./7vu6_A_noHET.pdb -o ./7vu6_A_noHET
-f
にはインプットする .pdb
ファイルを、-o
にはアウトプット先のディレクトリを指定する。
アウトプットディレクトリの visualizations
ディレクトリに .pml
ファイルが出力されるのでこれを PyMOL
で開くと、以下のように予測されたポケットが可視化される。
結晶構造におけるリガンド結合領域がちゃんとポケットとして推定されている。
裏側はこんな感じ。
ちなみに P2Rank
は .pdb
中の b-factor
カラムの値を予測に利用する仕様になっていて、結晶構造以外、つまりcryo-EM、NMR、あるいはAlphaFold由来の構造については b-factor
カラムの情報を使わせないように、以下のように -c
オプションを指定することが推奨されている。
# P2Rankの実行 (for cryo-EM, NMR, or AlphaFold structure)
🦐 prank predict -c alphafold -f input.pdb -o output_dir
Discussion