#author("2025-09-24T12:09:38+00:00","default:sysosa","sysosa") #author("2025-12-27T11:47:23+00:00","default:sysosa","sysosa") &size(10){過去ページ(windows版)[[Warp20241209]]}; WarpTools です. Warpはwindows向けのDeskTopアプリです 本家様 [[https://github.com/warpem/warp>+https://github.com/warpem/warp]] Warp is a set of tools for cryo-EM and cryo-ET data processing including, among other tools: Warp, M, WarpTools, MTools, MCore, and Noise2Map. condaで提供されている [[https://anaconda.org/warpem/warp>+https://anaconda.org/warpem/warp]] &size(10){rockylinux8なら「2.0.0dev34」までは大丈夫っぽい。だが、それより最新版は動かないっぽい...}; ここではpyenv-anaconda/miniforge3でconda環境を敷いている. っで #code(nonumber){{ git clone https://github.com/yyuu/pyenv.git /apps/pyenv export PYENV_ROOT=/apps/pyenv export PATH=$PYENV_ROOT/bin:$PATH pyenv install miniforge3-25.3.1-0 source /apps/pyenv/versions/miniforge3-25.3.1-0/etc/profile.d/conda.sh conda update conda pyenv install miniforge3-25.11.0-1 source /apps/pyenv/versions/miniforge3-25.11.0-1/etc/profile.d/conda.sh conda update -n base -c conda-forge conda (既に環境があるなら) source /apps/pyenv/versions/miniforge3-25.3.1-0/etc/profile.d/conda.sh source /apps/pyenv/versions/miniforge3-25.11.0-1/etc/profile.d/conda.sh }} その上で warp を構築します #code(nonumber){{ [root@rockylinux9 ~]# conda create -n warp warp -c warpem -c nvidia/label/cuda-11.8.0 -c pytorch -c conda-forge (確認) [root@rockylinux9 ~]# conda activate warp (warp) [root@rockylinux9 ~]# conda list : cuda-tools 11.8.0 0 nvidia/label/cuda-11.8.0 : dotnet 8.0.408 ha770c72_1 conda-forge dotnet-aspnetcore 8.0.15 ha770c72_1 conda-forge dotnet-runtime 8.0.15 h84d6215_1 conda-forge dotnet-sdk 8.0.408 h84d6215_1 conda-forge : mkl 2024.0.0 ha957f24_49657 conda-forge mkl-devel 2024.0.0 ha770c72_49657 conda-forge mkl-include 2024.0.0 ha957f24_49657 conda-forge : numpy 2.3.3 py311h2e04523_0 conda-f : python 3.11.9 hb806964_0_cpython conda-forge : pytorch 2.0.1 py3.11_cuda11.8_cudnn8.7.0_0 pytorch pytorch-cuda 11.8 h7e8668a_6 pytorch pytorch-mutex 1.0 cuda pytorch : setuptools 80.9.0 pyhff2d567_0 conda-forge : warp 2.0.0dev36 py311_0 warpem : (warp) [root@rockylinux9 ~]# (warp) [root@rockylinux9 ~]# pip install reliontomotools (warp) [root@rockylinux9 ~]# conda deactivate [root@rockylinux9 ~]# }} ***environment-modules [#i2a88d13] 「/apps/modulefiles/warp」 #code(nonumber){{ #%Module1.0 set root /apps/pyenv/versions/miniforge3-25.3.1-0/envs/warp set root /apps/pyenv/versions/miniforge3-25.11.0-1/envs/warp prepend-path PATH $root/bin prepend-path LD_LIBRARY_PATH $root/lib }} コマンドとしては「MTools」や「WarpTools」「Noise2Map」「Noise2Tomo」でしょうか ***warp-tm-vis [#l2890f00] Visualize 3D template matching results from Warp github [[https://github.com/warpem/warp-tm-vis>+https://github.com/warpem/warp-tm-vis]] pipy [[https://pypi.org/project/warp-tm-vis/>+https://pypi.org/project/warp-tm-vis/]] warp 仮想環境に uv をインストールします #code(nonumber){{ [root@rockylinux9 ~]# source /apps/pyenv/versions/miniforge3-25.3.1-0/etc/profile.d/conda.sh [root@rockylinux9 ~]# source /apps/pyenv/versions/miniforge3-25.11.0-1/etc/profile.d/conda.sh [root@rockylinux9 ~]# conda activate warp (warp) [root@rockylinux9 ~]# pip install uv (warp) [root@rockylinux9 ~]# conda list : urllib3 2.5.0 pyhd8ed1ab_0 conda-forge uv 0.8.19 pypi_0 pypi <-- uv のみが追加インストールされる warp 2.0.0dev36 py311_0 warpem : (warp) [root@rockylinux9 ~]# conda deactivate [root@rockylinux9 ~]# }} それで各ユーザで「module load warp」の後で「uvx warp-tm-vis」と実行します #code(nonumber){{ [saber@rockylinux9 ~]$ module use /apps/modulefiles [saber@rockylinux9 ~]$ module load warp [saber@rockylinux9 ~]$ which uvx /apps/pyenv/versions/miniforge3-25.3.1-0/envs/warp/bin/uvx /apps/pyenv/versions/miniforge3-25.11.0-1/envs/warp/bin/uvx [saber@rockylinux9 ~]$ uvx warp-tm-vis : : Traceback (most recent call last): File "/home/saber/.cache/uv/archive-v0/BfNHFpjYtsocHmIu8TDlv/bin/warp-tm-vis", line 6, in <module> from warp_tm_vis.cli import cli File "/home/saber/.cache/uv/archive-v0/BfNHFpjYtsocHmIu8TDlv/lib/python3.11/site-packages/warp_tm_vis/cli.py", line 18, in <module> console = rich.console.Console() ^^^^^^^^^^^^ AttributeError: module 'rich' has no attribute 'console'. Did you mean: '_console'? [saber@rockylinux9 ~]$ }} とエラーが発せします。ここで「cli.py」の中身を修正します 「from rich.console import Console」を追加します #code(diff,nonumber){{ from enum import Enum from pathlib import Path import mrcfile import napari import napari.utils.notifications import rich +from rich.console import Console import typer }} これで一応は起動する #code(nonumber){{ [saber@rockylinux9 ~]$ uvx warp-tm-vis Usage: warp-tm-vis [OPTIONS] Visualize Warp template matching results and the effects of thresholding lq Options qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x * --reconstruction-directory -rdir PATH directory containing tomograms e.g. x x warp_tiltseries/reconstruction/deconv x x [required] x x * --matching-directory -mdir PATH matching directory e.g. warp_tiltseries/matching [required] x x * --matching-pattern -mp TEXT matching pattern e.g. "*_flipx.star" [required] x x * --correlation-volume-pattern -cvp TEXT correlation volume pattern e.g. "*_flipx_corr.mrc" [required] x x --load-volumes --no-load-volumes whether or not to load reconstructions and correlation volumes x x [default: load-volumes] x x --help Show this message and exit. x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj [saber@rockylinux9 ~]$ }} ファイルを正しく指定するとアプリが立ち上がりますが、こちらはnapariで、ssh越しのリモートでは遅いです。コンソールとかで操作した方がよさげ. ***reliontomotools [#s6a07b17] Complementary tools for Relion tomo github [[https://github.com/joton/reliontomotools>+https://github.com/joton/reliontomotools]] pipy [[https://pypi.org/project/reliontomotools/>+https://pypi.org/project/reliontomotools/]] こちらも warp 仮想環境に追加するようにしました. #code(nonumber){{ [root@rockylinux9 ~]# source /apps/pyenv/versions/miniforge3-25.3.1-0/etc/profile.d/conda.sh [root@rockylinux9 ~]# conda activate warp (warp) [root@rockylinux9 ~]# pip install reliontomotools (確認) (warp) [root@rockylinux9 ~]# conda list tzdata 2025b h78e105d_0 conda-forge ↓ tzdata 2025.2 pypi_0 pypi (warp) [root@rockylinux9 ~]# conda deactivate [root@rockylinux9 ~]# }} 「pip install reliontomotools」の結果、既に存在しているパッケージの変更としては tzdataが 2025b -> 2025.2 へ変更されました. あと新規追加でemfile, mrcfile, pandas, reliontomotools らが追加された. この変更で warp の挙動とかに影響があれば、別のconda仮想環境を作る感じかな. environment-modulesはそのまま. ***warpをソースから作ってみた [#qedff33a] どうも v2.0.0dev36 からrockylinux8では上手く動かない様子. 原因はGLIBC. condaパッケージ品は GLIBC_2.29 を要求するのですが、rockylinux8は 2.28 までなのでエラー。 っで、2.28でも動くようにするにはソースから構築しかない. っで作ってみる #code(nonumber){{ [root@rockylinux8 ~]# cat /etc/redhat-release Rocky Linux release 8.10 (Green Obsidian) [root@rockylinux8 ~]# git clone https://github.com/yyuu/pyenv.git /apps/pyenv [root@rockylinux8 ~]# export PYENV_ROOT=/apps/pyenv [root@rockylinux8 ~]# export PATH=$PYENV_ROOT/bin:$PATH [root@rockylinux8 ~]# pyenv install miniforge3-25.3.1-0 [root@rockylinux8 ~]# source /apps/pyenv/versions/miniforge3-25.3.1-0/etc/profile.d/conda.sh [root@rockylinux8 ~]# cd /apps/ [root@rockylinux8 apps]# git clone https://github.com/warpem/warp [root@rockylinux8 apps]# cd warp/ [root@rockylinux8 warp]# conda env create -f warp_build.yml [root@rockylinux8 warp]# conda activate warp_build (warp_build) [root@rockylinux8 warp]# conda install 'cmake<4' (warp_build) [root@rockylinux8 warp]# ./scripts/build-native-unix.sh (warp_build) [root@rockylinux8 warp]# ./scripts/publish-unix.sh (warp_build) [root@rockylinux8 warp]# conda install uv (warp_build) [root@rockylinux8 warp]# pip install reliontomotools }} Environment-modules 「/apps/modulefiles/warp」 #code(nonumber){{ #%Module1.0 set root /apps/pyenv/versions/miniforge3-25.3.1-0/envs/warp_build set warp /apps/warp/Release/linux-x64/publish prepend-path PATH $warp:$root/bin #prepend-path LD_LIBRARY_PATH $warp/lib:$root/lib }}