Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save physicshinzui/1ec73c549ed1006fbb47a91c01d8ba67 to your computer and use it in GitHub Desktop.
Save physicshinzui/1ec73c549ed1006fbb47a91c01d8ba67 to your computer and use it in GitHub Desktop.
colabfoldのインストール手順とsingularityを使った使用方法.md

#colabfold #alphafold #singularity Update: 2024-04-05

Reference

1. ディレクトリを作成し移動

mkdir colabfold
cd colabfold
mkdir cache

2. Singularity imageを取得

singularity pull docker://ghcr.io/sokrypton/colabfold:1.5.5-cuda12.2.2

Note

Hokushinの場合、Cudaが11.8, 12.3をインストールしているので、それに対応するdockerイメージから引っ張ってくる方が良い。その場合、例えばこのようにして行う:

singularity pull docker://ghcr.io/sokrypton/colabfold:1.5.5-cuda11.8.0

reference: https://github.com/sokrypton/ColabFold/pkgs/container/colabfold/163549673?tag=1.5.5-cuda11.8.0

実際、

と公式は言っている。

3. alphafoldのパラメタを取得

singularity run -B $(pwd)/cache:/cache colabfold_1.5.5-cuda12.2.2.sif python -m colabfold.download

4. インプット配列を用意

インプット配列のファイル名をinput_sequence.fasta とする。

>sp|P54025|RL41_METJA 50S ribosomal protein L41e OS=Methanocaldococcus jannaschii (strain ATCC 43067 / DSM 2661 / JAL-1 / JCM 10045 / NBRC 100440) OX=243232 GN=rpl41e PE=3 SV=2
MIPIKRSSRRWKKKGRMRWKWYKKRLRRLKRERKRARS

5. 予測

singularity run --nv -B $(pwd)/cache:/cache \
    -B $(pwd):/work colabfold_1.5.5-cuda12.2.2.sif \
    colabfold_batch /work/input_sequence.fasta /work/output

6. 予測構造の確認

![[attatchments/colabfoldのインストール手順 2024-04-05 14.19.42.excalidraw]]

A:Trypcageの構造予測の結果

入力配列:

>1L2Y_1|Chain A|TC5b|null
NLYIQWLKDGGPSSGRPPPS

予測構造: ![[attatchments/colabfoldのインストール手順 2024-04-05 14.26.19.excalidraw]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment