一、获取源码
官方推荐使用git clone --recursive https://github.com/pangenome/smoothxg.git
但使用了--recursive参数默认是把子模块也同时下载,由于github是国外网站,子模块下载时经常超时,导致下载不完整,最终编译时会缺失各种文件。因此,整理了以下步骤,完整git clone smoothxg和它的所有子模块。(原理:每git clone一次,查看当前目录下的.gitmodules文件,把里面的模块都重新git clone一次,以此类推,直到最后一层没有.gitmodules文件)
注意:下述部分子模块有重复套娃,可以复制粘贴,减少git clone等待时间,但务必注意复制粘贴的路径,千万别弄错
1.1. 下载软件本体smoothxg
cd /path/to
git clone https://github.com/pangenome/smoothxg.git
1.2. 下载子模块BBHash
cd /path/to/smoothxg/deps
git clone https://github.com/vgteam/BBHash.git
1.3. 下载子模块sdsl-lite
cd /path/to/smoothxg/deps
git clone https://github.com/simongog/sdsl-lite.git
1.3.1. 下载子模块googletest
cd /path/to/smoothxg/deps/sdsl-lite/external
git clone https://github.com/google/googletest.git
1.3.2. 下载子模块libdivsufsort
cd /path/to/smoothxg/deps/sdsl-lite/external
git clone https://github.com/simongog/libdivsufsort.git
1.4. 下载子模块libhandlegraph
cd /path/to/smoothxg/deps
git clone https://github.com/vgteam/libhandlegraph.git
1.5. 下载子模块ips4o
cd /path/to/smoothxg/deps
git clone https://github.com/SaschaWitt/ips4o.git
1.6. 下载子模块args
cd /path/to/smoothxg/deps
git clone https://github.com/Taywee/args.git
1.7. 下载子模块gfakluge
cd /path/to/smoothxg/deps
git clone https://github.com/vgteam/gfakluge.git
1.7.1. 下载子模块GFA-spec
cd /path/to/smoothxg/deps/gfakluge
git clone https://github.com/GFA-spec/GFA-spec
1.7.2. 下载子模块pliib
cd /path/to/smoothxg/deps/gfakluge
git clone https://github.com/edawson/pliib
1.7.3. 下载子模块bash-tap
cd /path/to/smoothxg/deps/gfakluge
git clone https://github.com/illusori/bash-tap.git
1.7.4. 下载子模块tinyFA
cd /path/to/smoothxg/deps/gfakluge/src
rm -rf tinyFA
git clone https://github.com/edawson/tinyFA
1.7.4.1. 下载子模块pliib
cd /path/to/smoothxg/deps/gfakluge/src/tinyFA
git clone https://github.com/edawson/pliib
1.8. 下载子模块mmmulti
cd /path/to/smoothxg/deps
git clone https://github.com/ekg/mmmulti
1.8.1. 下载子模块mio
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/mandreyel/mio.git
1.8.2. 下载子模块args
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/Taywee/args.git
1.8.3. 下载子模块DYNAMIC
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/vgteam/DYNAMIC.git
1.8.3.1. 下载子模块hopscotch_map
cd /path/to/smoothxg/deps/mmmulti/deps/DYNAMIC/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.8.4. 下载子模块sdsl-lite
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/vgteam/sdsl-lite.git
1.8.4.1. 下载子模块googletest
cd /path/to/smoothxg/deps/mmmulti/deps/sdsl-lite/external
git clone https://github.com/google/googletest.git
1.8.4.2. 下载子模块libdivsufsort
cd /path/to/smoothxg/deps/mmmulti/deps/sdsl-lite/external
git clone https://github.com/simongog/libdivsufsort.git
1.8.5. 下载子模块ips4o
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/SaschaWitt/ips4o.git
1.8.6. 下载子模块atomic_queue
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/max0x7ba/atomic_queue.git
1.8.7. 下载子模块paryfor
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/ekg/paryfor.git
1.8.8. 下载子模块hopscotch-map
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.9. 下载子模块atomic_queue
cd /path/to/smoothxg/deps
git clone https://github.com/max0x7ba/atomic_queue.git
1.10. 下载子模块cgranges
cd /path/to/smoothxg/deps
git clone https://github.com/lh3/cgranges.git
1.11. 下载子模块atomicbitvector
cd /path/to/smoothxg/deps
git clone https://github.com/ekg/atomicbitvector.git
1.12. 下载子模块odgi
cd /path/to/smoothxg/deps
git clone https://github.com/pangenome/odgi.git
1.12.1. 下载子模块pybind11
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/pybind/pybind11.git
1.12.2. 下载子模块sdsl-lite
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/simongog/sdsl-lite.git
1.12.2.1. 下载子模块googletest
cd /path/to/smoothxg/deps/odgi/deps/sdsl-lite/external
git clone https://github.com/google/googletest.git
1.12.2.2. 下载子模块libdivsufsort
cd /path/to/smoothxg/deps/odgi/deps/sdsl-lite/external
git clone https://github.com/simongog/libdivsufsort.git
1.12.3. 下载子模块DYNAMIC
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/vgteam/DYNAMIC.git
1.12.3.1. 下载子模块hopscotch_map
cd /path/to/smoothxg/deps/odgi/deps/DYNAMIC/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.12.4. 下载子模块hopscotch_map
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.12.5. 下载子模块gfakluge
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/vgteam/gfakluge.git
1.12.5.1. 下载子模块GFA-spec
cd /path/to/smoothxg/deps/odgi/deps/gfakluge
git clone https://github.com/GFA-spec/GFA-spec
1.12.5.2. 下载子模块pliib
cd /path/to/smoothxg/deps/odgi/deps/gfakluge
git clone https://github.com/edawson/pliib
1.12.5.3. 下载子模块bash-tap
cd /path/to/smoothxg/deps/odgi/deps/gfakluge
git clone https://github.com/illusori/bash-tap.git
1.12.5.4. 下载子模块tinyFA
cd /path/to/smoothxg/deps/odgi/deps/gfakluge/src
rm -rf tinyFA
git clone https://github.com/edawson/tinyFA
下载子模块pliib
cd /path/to/smoothxg/deps/odgi/deps/gfakluge/src/tinyFA
git clone https://github.com/edawson/pliib
1.12.6. 下载子模块libhandlegraph
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/vgteam/libhandlegraph.git
1.12.7. 下载子模块args
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/Taywee/args.git
1.12.8. 下载子模块BBHash
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/vgteam/BBHash.git
1.12.9. 下载子模块sparsepp
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/edawson/sparsepp.git
1.12.10. 下载子模块flat_hash_map
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/skarupke/flat_hash_map.git
1.12.11. 下载子模块intervaltree
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/intervaltree.git
1.12.12. 下载子模块lodepng
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/lodepng.git
1.12.13. 下载子模块PicoSHA2
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/okdshin/PicoSHA2.git
1.12.14. 下载子模块sgd2
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/sgd2.git
1.12.15. 下载子模块structures
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/jeizenga/structures.git
1.12.16. 下载子模块libbf
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/subwaystation/libbf.git
1.12.17. 下载子模块cpp-httplib
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/yhirose/cpp-httplib.git
1.12.18. 下载子模块cpp_random_distributions
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/llersch/cpp_random_distributions.git
1.12.19. 下载子模块cgranges
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/lh3/cgranges.git
1.12.20. 下载子模块mmmulti
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/mmmulti
1.12.20.1. 下载子模块mio
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/mandreyel/mio.git
1.12.20.2. 下载子模块args
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/Taywee/args.git
1.12.20.3. 下载子模块DYNAMIC
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/vgteam/DYNAMIC.git
下载子模块hopscotch_map
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps/DYNAMIC/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.12.20.4. 下载子模块sdsl-lite
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/vgteam/sdsl-lite.git
下载子模块googletest
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps/sdsl-lite/external
git clone https://github.com/google/googletest.git
下载子模块libdivsufsort
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps/sdsl-lite/external
git clone https://github.com/simongog/libdivsufsort.git
1.12.20.5. 下载子模块ips4o
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/SaschaWitt/ips4o.git
1.12.20.6. 下载子模块atomic_queue
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/max0x7ba/atomic_queue.git
1.12.20.7. 下载子模块paryfor
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/ekg/paryfor.git
1.12.20.8. 下载子模块hopscotch-map
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.12.21. 下载子模块ips4o
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/SaschaWitt/ips4o.git
1.12.22. 下载子模块atomic_queue
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/max0x7ba/atomic_queue.git
1.12.23. 下载子模块Xoshiro-cpp
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/Reputeless/Xoshiro-cpp.git
1.12.24. 下载子模块dirtyzipf
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/dirtyzipf.git
1.12.25. 下载子模块atomicbitvector
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/atomicbitvector.git
1.13. 下载子模块libbf
cd /path/to/smoothxg/deps
git clone https://github.com/subwaystation/libbf.git
1.14. 下载子模块sautocorr
cd /path/to/smoothxg/deps
git clone https://github.com/ekg/sautocorr.git
1.15. 下载子模块abPOA
cd /path/to/smoothxg/deps
git clone https://github.com/yangao07/abPOA.git
1.15.1. 下载子模块simde
cd /path/to/smoothxg/deps/abPOA/include
git clone https://github.com/simd-everywhere/simde.git
1.15.1.1. 下载子模块munit
cd /path/to/smoothxg/deps/abPOA/include/simde/test
git clone https://github.com/nemequ/munit.git
1.16. 下载子模块edlib
cd /path/to/smoothxg/deps
git clone https://github.com/Martinsos/edlib.git
1.17. 下载子模块mkmh
cd /path/to/smoothxg/deps
git clone https://github.com/AndreaGuarracino/mkmh.git
1.17.1. 下载子模块murmur3
cd /path/to/smoothxg/deps/mkmh
git clone https://github.com/edawson/murmur3.git
1.17.2. 下载子模块Catch2
cd /path/to/smoothxg/deps/mkmh
git clone https://github.com/catchorg/Catch2.git
1.17.3. 下载子模块xxHash
cd /path/to/smoothxg/deps/mkmh
git clone https://github.com/Cyan4973/xxHash.git
1.18. 下载子模块patchmap
cd /path/to/smoothxg/deps
git clone https://github.com/1ykos/patchmap.git
1.19. 下载子模块WFA
cd /path/to/smoothxg/deps
git clone https://github.com/pangenome/WFA.git
1.20. 下载子模块spoa
cd /path/to/smoothxg/deps
git clone https://github.com/rvaser/spoa.git
1.21. 下载子模块xxHash
cd /path/to/smoothxg/deps
git clone https://github.com/Cyan4973/xxHash.git
二、下载系统依赖
处理器:鲲鹏920系列
操作系统:openEuler 22.03 SP2
yum源:openEuler官方网络源
编译器:系统自带gcc10.3.1编译器
安装所需系统依赖:
三、编译步骤
3.1. 进入软件目录smoothxg,生成编译文件makefile
3.2. 第一次编译,解决报错“set_target_properties called with incorrect number of arguments.”
出现报错:

解决方法:
修改/path/to/smoothxg/deps/sdsl-lite/external/googletest/googletest/CMakeLists.txt的第124行和142行,在${GOOGLETEST_VERSION}前后加上双引号,
同理修改/path/to/smoothxg/deps/mmmulti/deps/sdsl-lite/external/googletest/googletest/CMakeLists.txt、/path/to/smoothxg/deps/odgi/deps/sdsl-lite/external/googletest/googletest/CMakeLists.txt、/path/to/smoothxg/deps/odgi/deps/mmmulti/deps/sdsl-lite/external/googletest/googletest/CMakeLists.txt

3.3. 第二次编译,解决报错“error: #error C++ versions less than C++14 are not supported.”
出现报错:

解决方法:全局搜到-std=c++11的地方,删除规避
3.4. 第三次编译,解决报错“g++: error: unrecognized command-line option ‘-msse4.2’”
出现报错:

解决方法:全局搜到-msse4.2的地方,删除规避
3.5. 第四次编译,解决报错“error: #error C++ versions less than C++14 are not supported.”
出现报错:

解决方法:全局搜到-std=c++11的地方,删除规避
(说明:此处的错误与第二次编译的错误一样,这次出现的报错,是出现在odgi的目录下的sdsl-lite目录的报错)
3.6. 第五次编译,解决报错“fatal error: dynamic.hpp: No such file or directory”
出现报错:

解决方法:将dynamic.hpp拷贝到正确目录下
3.7. 第六次编译,解决报错“fatal error: tinyfa.hpp: No such file or directory”
出现报错:

解决方法:将tinyFA.hpp重命名成tinyfa.hpp
3.8. 第七次编译,解决报错“fatal error: pliib.hpp: No such file or directory”
出现报错:

解决方法:将pliib.hpp拷贝到正确目录下
3.8. 第八次编译,解决报错“error: ‘string’ does not name a type; did you mean ‘stdin’?”
出现报错:

解决方法:全局搜到-std=gnu++17的地方,替换成-std=c++17,同时在gfakluge.hpp第3行引入using namespace std;
在第3行加入using namespace std;
在第3行加入using namespace std;

3.10. 第九次编译,解决报错“error: invalid name ("x86-64") in ‘target("arch=")’ pragma or attribute”
出现报错:

解决方法:将文件main.cpp中第32行的x86-64改成armv8-a
将第32行的x86-64改成armv8-a

3.11. 第十次编译,解决报错“fatal error: immintrin.h: No such file or directory”
出现报错:

解决方法:替换头文件,将文件simd_instruction.h中的<immintrin.h>改成"sse2neon.h",同时下载sse2neon.h到immintrin.h的同级目录下
将第21行<immintrin.h>修改成"sse2neon.h"

3.12. 第十一次编译,解决报错“error: lane -4 out of range 0 - 15”
出现报错:

解决方法:修改sse2neon.h第5361行,取消限制lane
第5361行改成((imm <= 0 || imm > 0) )); \
第5364行改成((imm <= 0 || imm > 0) )); \

3.13. 第十二次编译,解决报错“fatal error: dynamic.hpp: No such file or directory”
出现报错:

解决方法:将dynamic.hpp拷贝到正确目录下
(说明:此处的错误与第五次编译的错误一样,这次出现的报错,是出现在build的目录下的odgi-prefix目录的报错)
3.14. 第十三次编译,解决报错“error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ [-Wnarrowing]”
出现报错:

解决方法:修改abpoa_output.c
将第15行的char改成signed char

3.15. 最后一次编译,编译成功

四、验证与测试
命令中的“-t 8”指的是8线程,可根据机器情况修改,本文举例以8线程运行时间最短,性能最优
一、获取源码
官方推荐使用git clone --recursive https://github.com/pangenome/smoothxg.git
但使用了--recursive参数默认是把子模块也同时下载,由于github是国外网站,子模块下载时经常超时,导致下载不完整,最终编译时会缺失各种文件。因此,整理了以下步骤,完整git clone smoothxg和它的所有子模块。(原理:每git clone一次,查看当前目录下的.gitmodules文件,把里面的模块都重新git clone一次,以此类推,直到最后一层没有.gitmodules文件)
注意:下述部分子模块有重复套娃,可以复制粘贴,减少git clone等待时间,但务必注意复制粘贴的路径,千万别弄错
1.1. 下载软件本体smoothxg
cd /path/to
git clone https://github.com/pangenome/smoothxg.git
1.2. 下载子模块BBHash
cd /path/to/smoothxg/deps
git clone https://github.com/vgteam/BBHash.git
1.3. 下载子模块sdsl-lite
cd /path/to/smoothxg/deps
git clone https://github.com/simongog/sdsl-lite.git
1.3.1. 下载子模块googletest
cd /path/to/smoothxg/deps/sdsl-lite/external
git clone https://github.com/google/googletest.git
1.3.2. 下载子模块libdivsufsort
cd /path/to/smoothxg/deps/sdsl-lite/external
git clone https://github.com/simongog/libdivsufsort.git
1.4. 下载子模块libhandlegraph
cd /path/to/smoothxg/deps
git clone https://github.com/vgteam/libhandlegraph.git
1.5. 下载子模块ips4o
cd /path/to/smoothxg/deps
git clone https://github.com/SaschaWitt/ips4o.git
1.6. 下载子模块args
cd /path/to/smoothxg/deps
git clone https://github.com/Taywee/args.git
1.7. 下载子模块gfakluge
cd /path/to/smoothxg/deps
git clone https://github.com/vgteam/gfakluge.git
1.7.1. 下载子模块GFA-spec
cd /path/to/smoothxg/deps/gfakluge
git clone https://github.com/GFA-spec/GFA-spec
1.7.2. 下载子模块pliib
cd /path/to/smoothxg/deps/gfakluge
git clone https://github.com/edawson/pliib
1.7.3. 下载子模块bash-tap
cd /path/to/smoothxg/deps/gfakluge
git clone https://github.com/illusori/bash-tap.git
1.7.4. 下载子模块tinyFA
cd /path/to/smoothxg/deps/gfakluge/src
rm -rf tinyFA
git clone https://github.com/edawson/tinyFA
1.7.4.1. 下载子模块pliib
cd /path/to/smoothxg/deps/gfakluge/src/tinyFA
git clone https://github.com/edawson/pliib
1.8. 下载子模块mmmulti
cd /path/to/smoothxg/deps
git clone https://github.com/ekg/mmmulti
1.8.1. 下载子模块mio
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/mandreyel/mio.git
1.8.2. 下载子模块args
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/Taywee/args.git
1.8.3. 下载子模块DYNAMIC
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/vgteam/DYNAMIC.git
1.8.3.1. 下载子模块hopscotch_map
cd /path/to/smoothxg/deps/mmmulti/deps/DYNAMIC/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.8.4. 下载子模块sdsl-lite
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/vgteam/sdsl-lite.git
1.8.4.1. 下载子模块googletest
cd /path/to/smoothxg/deps/mmmulti/deps/sdsl-lite/external
git clone https://github.com/google/googletest.git
1.8.4.2. 下载子模块libdivsufsort
cd /path/to/smoothxg/deps/mmmulti/deps/sdsl-lite/external
git clone https://github.com/simongog/libdivsufsort.git
1.8.5. 下载子模块ips4o
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/SaschaWitt/ips4o.git
1.8.6. 下载子模块atomic_queue
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/max0x7ba/atomic_queue.git
1.8.7. 下载子模块paryfor
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/ekg/paryfor.git
1.8.8. 下载子模块hopscotch-map
cd /path/to/smoothxg/deps/mmmulti/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.9. 下载子模块atomic_queue
cd /path/to/smoothxg/deps
git clone https://github.com/max0x7ba/atomic_queue.git
1.10. 下载子模块cgranges
cd /path/to/smoothxg/deps
git clone https://github.com/lh3/cgranges.git
1.11. 下载子模块atomicbitvector
cd /path/to/smoothxg/deps
git clone https://github.com/ekg/atomicbitvector.git
1.12. 下载子模块odgi
cd /path/to/smoothxg/deps
git clone https://github.com/pangenome/odgi.git
1.12.1. 下载子模块pybind11
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/pybind/pybind11.git
1.12.2. 下载子模块sdsl-lite
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/simongog/sdsl-lite.git
1.12.2.1. 下载子模块googletest
cd /path/to/smoothxg/deps/odgi/deps/sdsl-lite/external
git clone https://github.com/google/googletest.git
1.12.2.2. 下载子模块libdivsufsort
cd /path/to/smoothxg/deps/odgi/deps/sdsl-lite/external
git clone https://github.com/simongog/libdivsufsort.git
1.12.3. 下载子模块DYNAMIC
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/vgteam/DYNAMIC.git
1.12.3.1. 下载子模块hopscotch_map
cd /path/to/smoothxg/deps/odgi/deps/DYNAMIC/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.12.4. 下载子模块hopscotch_map
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.12.5. 下载子模块gfakluge
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/vgteam/gfakluge.git
1.12.5.1. 下载子模块GFA-spec
cd /path/to/smoothxg/deps/odgi/deps/gfakluge
git clone https://github.com/GFA-spec/GFA-spec
1.12.5.2. 下载子模块pliib
cd /path/to/smoothxg/deps/odgi/deps/gfakluge
git clone https://github.com/edawson/pliib
1.12.5.3. 下载子模块bash-tap
cd /path/to/smoothxg/deps/odgi/deps/gfakluge
git clone https://github.com/illusori/bash-tap.git
1.12.5.4. 下载子模块tinyFA
cd /path/to/smoothxg/deps/odgi/deps/gfakluge/src
rm -rf tinyFA
git clone https://github.com/edawson/tinyFA
下载子模块pliib
cd /path/to/smoothxg/deps/odgi/deps/gfakluge/src/tinyFA
git clone https://github.com/edawson/pliib
1.12.6. 下载子模块libhandlegraph
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/vgteam/libhandlegraph.git
1.12.7. 下载子模块args
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/Taywee/args.git
1.12.8. 下载子模块BBHash
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/vgteam/BBHash.git
1.12.9. 下载子模块sparsepp
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/edawson/sparsepp.git
1.12.10. 下载子模块flat_hash_map
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/skarupke/flat_hash_map.git
1.12.11. 下载子模块intervaltree
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/intervaltree.git
1.12.12. 下载子模块lodepng
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/lodepng.git
1.12.13. 下载子模块PicoSHA2
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/okdshin/PicoSHA2.git
1.12.14. 下载子模块sgd2
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/sgd2.git
1.12.15. 下载子模块structures
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/jeizenga/structures.git
1.12.16. 下载子模块libbf
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/subwaystation/libbf.git
1.12.17. 下载子模块cpp-httplib
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/yhirose/cpp-httplib.git
1.12.18. 下载子模块cpp_random_distributions
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/llersch/cpp_random_distributions.git
1.12.19. 下载子模块cgranges
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/lh3/cgranges.git
1.12.20. 下载子模块mmmulti
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/mmmulti
1.12.20.1. 下载子模块mio
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/mandreyel/mio.git
1.12.20.2. 下载子模块args
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/Taywee/args.git
1.12.20.3. 下载子模块DYNAMIC
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/vgteam/DYNAMIC.git
下载子模块hopscotch_map
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps/DYNAMIC/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.12.20.4. 下载子模块sdsl-lite
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/vgteam/sdsl-lite.git
下载子模块googletest
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps/sdsl-lite/external
git clone https://github.com/google/googletest.git
下载子模块libdivsufsort
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps/sdsl-lite/external
git clone https://github.com/simongog/libdivsufsort.git
1.12.20.5. 下载子模块ips4o
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/SaschaWitt/ips4o.git
1.12.20.6. 下载子模块atomic_queue
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/max0x7ba/atomic_queue.git
1.12.20.7. 下载子模块paryfor
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/ekg/paryfor.git
1.12.20.8. 下载子模块hopscotch-map
cd /path/to/smoothxg/deps/odgi/deps/mmmulti/deps
git clone https://github.com/Tessil/hopscotch-map.git
1.12.21. 下载子模块ips4o
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/SaschaWitt/ips4o.git
1.12.22. 下载子模块atomic_queue
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/max0x7ba/atomic_queue.git
1.12.23. 下载子模块Xoshiro-cpp
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/Reputeless/Xoshiro-cpp.git
1.12.24. 下载子模块dirtyzipf
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/dirtyzipf.git
1.12.25. 下载子模块atomicbitvector
cd /path/to/smoothxg/deps/odgi/deps
git clone https://github.com/ekg/atomicbitvector.git
1.13. 下载子模块libbf
cd /path/to/smoothxg/deps
git clone https://github.com/subwaystation/libbf.git
1.14. 下载子模块sautocorr
cd /path/to/smoothxg/deps
git clone https://github.com/ekg/sautocorr.git
1.15. 下载子模块abPOA
cd /path/to/smoothxg/deps
git clone https://github.com/yangao07/abPOA.git
1.15.1. 下载子模块simde
cd /path/to/smoothxg/deps/abPOA/include
git clone https://github.com/simd-everywhere/simde.git
1.15.1.1. 下载子模块munit
cd /path/to/smoothxg/deps/abPOA/include/simde/test
git clone https://github.com/nemequ/munit.git
1.16. 下载子模块edlib
cd /path/to/smoothxg/deps
git clone https://github.com/Martinsos/edlib.git
1.17. 下载子模块mkmh
cd /path/to/smoothxg/deps
git clone https://github.com/AndreaGuarracino/mkmh.git
1.17.1. 下载子模块murmur3
cd /path/to/smoothxg/deps/mkmh
git clone https://github.com/edawson/murmur3.git
1.17.2. 下载子模块Catch2
cd /path/to/smoothxg/deps/mkmh
git clone https://github.com/catchorg/Catch2.git
1.17.3. 下载子模块xxHash
cd /path/to/smoothxg/deps/mkmh
git clone https://github.com/Cyan4973/xxHash.git
1.18. 下载子模块patchmap
cd /path/to/smoothxg/deps
git clone https://github.com/1ykos/patchmap.git
1.19. 下载子模块WFA
cd /path/to/smoothxg/deps
git clone https://github.com/pangenome/WFA.git
1.20. 下载子模块spoa
cd /path/to/smoothxg/deps
git clone https://github.com/rvaser/spoa.git
1.21. 下载子模块xxHash
cd /path/to/smoothxg/deps
git clone https://github.com/Cyan4973/xxHash.git
二、下载系统依赖
处理器:鲲鹏920系列
操作系统:openEuler 22.03 SP2
yum源:openEuler官方网络源
编译器:系统自带gcc10.3.1编译器
安装所需系统依赖:
三、编译步骤
3.1. 进入软件目录smoothxg,生成编译文件makefile
3.2. 第一次编译,解决报错“set_target_properties called with incorrect number of arguments.”
出现报错:
解决方法:
修改/path/to/smoothxg/deps/sdsl-lite/external/googletest/googletest/CMakeLists.txt的第124行和142行,在${GOOGLETEST_VERSION}前后加上双引号,
同理修改/path/to/smoothxg/deps/mmmulti/deps/sdsl-lite/external/googletest/googletest/CMakeLists.txt、/path/to/smoothxg/deps/odgi/deps/sdsl-lite/external/googletest/googletest/CMakeLists.txt、/path/to/smoothxg/deps/odgi/deps/mmmulti/deps/sdsl-lite/external/googletest/googletest/CMakeLists.txt
3.3. 第二次编译,解决报错“error: #error C++ versions less than C++14 are not supported.”
出现报错:
解决方法:全局搜到-std=c++11的地方,删除规避
3.4. 第三次编译,解决报错“g++: error: unrecognized command-line option ‘-msse4.2’”
出现报错:
解决方法:全局搜到-msse4.2的地方,删除规避
3.5. 第四次编译,解决报错“error: #error C++ versions less than C++14 are not supported.”
出现报错:
解决方法:全局搜到-std=c++11的地方,删除规避
(说明:此处的错误与第二次编译的错误一样,这次出现的报错,是出现在odgi的目录下的sdsl-lite目录的报错)
3.6. 第五次编译,解决报错“fatal error: dynamic.hpp: No such file or directory”
出现报错:
解决方法:将dynamic.hpp拷贝到正确目录下
3.7. 第六次编译,解决报错“fatal error: tinyfa.hpp: No such file or directory”
出现报错:
解决方法:将tinyFA.hpp重命名成tinyfa.hpp
3.8. 第七次编译,解决报错“fatal error: pliib.hpp: No such file or directory”
出现报错:
解决方法:将pliib.hpp拷贝到正确目录下
3.8. 第八次编译,解决报错“error: ‘string’ does not name a type; did you mean ‘stdin’?”
出现报错:
解决方法:全局搜到-std=gnu++17的地方,替换成-std=c++17,同时在gfakluge.hpp第3行引入using namespace std;
在第3行加入using namespace std;
在第3行加入using namespace std;
3.10. 第九次编译,解决报错“error: invalid name ("x86-64") in ‘target("arch=")’ pragma or attribute”
出现报错:
解决方法:将文件main.cpp中第32行的x86-64改成armv8-a
将第32行的x86-64改成armv8-a
3.11. 第十次编译,解决报错“fatal error: immintrin.h: No such file or directory”
出现报错:
解决方法:替换头文件,将文件simd_instruction.h中的<immintrin.h>改成"sse2neon.h",同时下载sse2neon.h到immintrin.h的同级目录下
将第21行<immintrin.h>修改成"sse2neon.h"
3.12. 第十一次编译,解决报错“error: lane -4 out of range 0 - 15”
出现报错:
解决方法:修改sse2neon.h第5361行,取消限制lane
第5361行改成((imm <= 0 || imm > 0) )); \
第5364行改成((imm <= 0 || imm > 0) )); \
3.13. 第十二次编译,解决报错“fatal error: dynamic.hpp: No such file or directory”
出现报错:
解决方法:将dynamic.hpp拷贝到正确目录下
(说明:此处的错误与第五次编译的错误一样,这次出现的报错,是出现在build的目录下的odgi-prefix目录的报错)
3.14. 第十三次编译,解决报错“error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ [-Wnarrowing]”
出现报错:
解决方法:修改abpoa_output.c
将第15行的char改成signed char
3.15. 最后一次编译,编译成功
四、验证与测试
命令中的“-t 8”指的是8线程,可根据机器情况修改,本文举例以8线程运行时间最短,性能最优