崩溃的一天-配置Minigraph-Cactus

看到这篇文章:

image-20231102100555416

参考文献:

Hickey G, Monlong J, Ebler J, et al. Pangenome graph construction from genome alignments with Minigraph-Cactus[J]. Nature Biotechnology, 2023: 1-11.

官方推荐使用docker安装,可是真的不想在实验室服务器上安装docker,conda上也是很久的包了,没有最新的。实验室服务器能不手动编译最好,那就在个人云服务器上线编译好再下载上传到实验室服务器。

直接手动编译:

1
git clone https://github.com/ComparativeGenomicsToolkit/cactus.git --recursive

安装依赖:

1
2
3
4
5
6
7
8
9
python3 -m pip install virtualenv
cd cactus
virtualenv -p python3 cactus_env
echo "export PATH=$(pwd)/bin:\$PATH" >> cactus_env/bin/activate
echo "export PYTHONPATH=$(pwd)/lib:\$PYTHONPATH" >> cactus_env/bin/activate
source cactus_env/bin/activate
python3 -m pip install -U setuptools pip wheel
python3 -m pip install -U .
python3 -m pip install -U -r ./toil-requirement.txt

再安装一些依赖:

1
grep apt-get Dockerfile | head -1 | sed -e 's/RUN //g' -e 's/apt-get/sudo apt-get/g'

开始编译:

1
make -j 8

最需要的流程是Minigraph-Cactus:

1
build-tools/downloadPangenomeTools

快编译完了报错:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[ 98%] Building CXX object CMakeFiles/odgi.dir/src/main.cpp.o
[ 98%] Linking CXX static library ../lib/libodgi.a
[ 98%] Linking CXX executable ../bin/odgi
/usr/bin/ld: cannot find -ljemalloc
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/odgi.dir/build.make:345: ../bin/odgi] Error 1
make[1]: *** [CMakeFiles/Makefile2:660: CMakeFiles/odgi.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: cannot find -ljemalloc
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/libodgi_shared.dir/build.make:330: ../lib/libodgi.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:1056: CMakeFiles/libodgi_shared.dir/all] Error 2
[ 98%] Built target libodgi_static
make: *** [Makefile:141: all] Error 2

先把这个给安装了(PS:个人云服务器的好处就是随便玩,sudo都随便玩,大不了重装系统):

1
sudo apt install libjemalloc-dev

然后重复上一步重新编译。

通过没有加速,那下载这一堆东西都要崩溃:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
+ wget -q https://github.com/ComparativeGenomicsToolkit/hal2vg/releases/download/v1.1.4/hal2vg
+ chmod +x hal2vg
+ [[ '' -ne 1 ]]
+ mv hal2vg /home/lixiang/temp/cactus/bin
+ cd /home/lixiang/temp/cactus/build-pangenome-tools
+ wget -q https://github.com/ComparativeGenomicsToolkit/hal2vg/releases/download/v1.1.4/clip-vg
+ chmod +x clip-vg
+ [[ '' -ne 1 ]]
+ mv clip-vg /home/lixiang/temp/cactus/bin
+ cd /home/lixiang/temp/cactus/build-pangenome-tools
+ wget -q https://github.com/ComparativeGenomicsToolkit/hal2vg/releases/download/v1.1.4/halRemoveDupes
+ chmod +x halRemoveDupes
+ [[ '' -ne 1 ]]
+ mv halRemoveDupes /home/lixiang/temp/cactus/bin
+ cd /home/lixiang/temp/cactus/build-pangenome-tools
+ wget -q https://github.com/ComparativeGenomicsToolkit/hal2vg/releases/download/v1.1.4/halMergeChroms
+ chmod +x halMergeChroms
+ [[ '' -ne 1 ]]
+ mv halMergeChroms /home/lixiang/temp/cactus/bin
+ cd /home/lixiang/temp/cactus/build-pangenome-tools
+ wget -q https://github.com/ComparativeGenomicsToolkit/hal2vg/releases/download/v1.1.4/halUnclip

顺便把这个也编译了:

1
build-tools/downloadMafTools

崩溃的一天-配置Minigraph-Cactus
https://lixiang117423.github.io/article/minigraph-cactus/
作者
李详【Xiang LI】
发布于
2023年11月2日
许可协议