安装生物信息学工具 DIAMOND 时遇到问题

安装生物信息学工具 DIAMOND 时遇到问题

我正在尝试安装名为 DIAMOND 的生物信息学工具。不幸的是,我在安装过程中遇到了问题:

我使用的 Ubuntu 版本是:Ubuntu 14.04 LTS

我正在遵循本手册:https://github.com/bbuchfink/diamond/blob/master/README.rst

首先我执行以下命令:

wget http://github.com/bbuchfink/diamond/releases/download/v0.7.9/diamond-linux64.tar.gz

tar xzf diamond-linux64.tar.gz

我在要安装程序的目录中执行了该命令。我现在拥有的文件是:

  • 钻石
  • diamond-linux64.tar.gz
  • 自述文件

当我从手册执行测试命令时,收到此错误:

markschuurman@markschuurman-OptiPlex-7010:~/Desktop/Onderzoek_BioCentre/DIAMOND_BLAST$ diamond makedb --in nr.faa -d nr
No command 'diamond' found, did you mean:
 Command 'kdiamond' from package 'kdiamond' (universe)
diamond: command not found

之后我尝试了“从源代码编译”、“使用 CMake 编译”和“使用 Homebrew/Linuxbrew 安装,但均未成功”。

来自手册的命令和错误:

$ wget http://github.com/bbuchfink/diamond/archive/v0.7.9.tar.gz

没有错误

$ tar xzf v0.7.9.tar.gz

没有错误

$ cd diamond-0.7.9/src

没有错误

markschuurman@markschuurman-OptiPlex-7010:~/Desktop/Onderzoek_BioCentre/DIAMOND_BLAST/diamond-0.7.9/src$ ./install-boost

/libboost_chrono.a
common.copy ../boost/lib/libboost_chrono.a
common.mkdir bin.v2/libs/iostreams/build/gcc-4.8/release/link-static
common.mkdir bin.v2/libs/iostreams/build/gcc-4.8/release/link-static/threading-multi
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.8/release/link-static/threading-multi/file_descriptor.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.8/release/link-static/threading-multi/mapped_file.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.8/release/link-static/threading-multi/bzip2.o
libs/iostreams/src/bzip2.cpp:20:56: fatal error: bzlib.h: No such file or directory
 #include "bzlib.h"  // Julian Seward's "bzip.h" header.
                                                        ^
compilation terminated.

......

common.copy ../boost/lib/libboost_thread.a
common.mkdir bin.v2/libs/timer/build/gcc-4.8/release/link-static
common.mkdir bin.v2/libs/timer/build/gcc-4.8/release/link-static/threading-multi
gcc.compile.c++ bin.v2/libs/timer/build/gcc-4.8/release/link-static/threading-multi/auto_timers_construction.o
gcc.compile.c++ bin.v2/libs/timer/build/gcc-4.8/release/link-static/threading-multi/cpu_timer.o
gcc.archive bin.v2/libs/timer/build/gcc-4.8/release/link-static/threading-multi/libboost_timer.a
common.copy ../boost/lib/libboost_timer.a
...failed updating 2 targets...
...skipped 6 targets...
...updated 11465 targets...

markschuurman@markschuurman-OptiPlex-7010:~/Desktop/Onderzoek_BioCentre/DIAMOND_BLAST/diamond-0.7.9/src$ make
gcc -O3 -DNDEBUG -c -o algo/blast/core/blast_encoding.o algo/blast/core/blast_encoding.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/blast_stat.o algo/blast/core/blast_stat.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/blast_filter.o algo/blast/core/blast_filter.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/blast_util.o algo/blast/core/blast_util.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/blast_message.o algo/blast/core/blast_message.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/ncbi_erf.o algo/blast/core/ncbi_erf.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/blast_options.o algo/blast/core/blast_options.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/ncbi_math.o algo/blast/core/ncbi_math.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/blast_program.o algo/blast/core/blast_program.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/ncbi_std.o algo/blast/core/ncbi_std.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/blast_psi_priv.o algo/blast/core/blast_psi_priv.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/raw_scoremat.o algo/blast/core/raw_scoremat.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/blast_query_info.o algo/blast/core/blast_query_info.c
gcc -O3 -DNDEBUG -c -o algo/blast/core/blast_seg.o algo/blast/core/blast_seg.c
g++ -O3 -DNDEBUG -Iboost/include -Wall -Wno-uninitialized -march=native -c -o main.o main.cpp
g++ -O3 -DNDEBUG -Iboost/include -Wall -Wno-uninitialized -march=native -c -o basic/options.o basic/options.cpp
g++ -O3 -DNDEBUG -Iboost/include -Wall -Wno-uninitialized -march=native -c -o util/tinythread.o util/tinythread.cpp
g++ -o ../bin/diamond algo/blast/core/blast_encoding.o algo/blast/core/blast_stat.o algo/blast/core/blast_filter.o algo/blast/core/blast_util.o algo/blast/core/blast_message.o algo/blast/core/ncbi_erf.o algo/blast/core/blast_options.o algo/blast/core/ncbi_math.o algo/blast/core/blast_program.o algo/blast/core/ncbi_std.o algo/blast/core/blast_psi_priv.o algo/blast/core/raw_scoremat.o algo/blast/core/blast_query_info.o algo/blast/core/blast_seg.o main.o basic/options.o util/tinythread.o boost/lib/libboost_thread.a boost/lib/libboost_system.a boost/lib/libboost_timer.a boost/lib/libboost_chrono.a boost/lib/libboost_iostreams.a boost/lib/libboost_program_options.a -lpthread -lz -lrt
g++: error: boost/lib/libboost_iostreams.a: No such file or directory
make: *** [diamond] Error 1

尝试使用 CMake:

wget http://github.com/bbuchfink/diamond/archive/v0.7.9.tar.gz

没有错误

tar xzf v0.7.9.tar.gz

没有错误

cd diamond-0.7.9

没有错误

mkdir build

没有错误

markschuurman@markschuurman-OptiPlex-7010:~/Desktop/Onderzoek_BioCentre/DIAMOND_BLAST/diamond-0.7.9$ cmake .. # Use cmake -DCMAKE_INSTALL_PREFIX=... to install to a different prefix.

这里我不明白我需要哪个前缀

使用 Homebrew/Linuxbrew 安装:

markschuurman@markschuurman-OptiPlex-7010:~/Desktop/Onderzoek_BioCentre/DIAMOND_BLAST/diamond-0.7.9$ brew install homebrew/science/diamond
No command 'brew' found, did you mean:
 Command 'qbrew' from package 'qbrew' (universe)
 Command 'brec' from package 'bplay' (universe)
brew: command not found

答案1

解决方案是将可执行文件放在diamond目录中/usr/bin。此后,无需进一步的安装步骤,该程序就可以运行。

相关内容