安装Amos
Amos是纯于比较难安装那种,因为依赖关系比较复杂。
首先编译需要qt4-dev
和boost graph toolkit
:
sudo apt-get install libqt4-dev
sudo apt-get install libboost-graph-dev
再者是perl
模块:
sudo cpan -i DBI
sudo cpan -i Statistics::Descriptive
还有一些第三方的软件MUMmer
和BLAT
,MUMmer
可以通过apt
安装:
sudo apt-get install mummer
但BLAT
则需要自己编译:
wget -c https://users.soe.ucsc.edu/~kent/src/blatSrc35.zip
unzip blatSrc35.zip
cd blatSrc
mkdir -p ~/bin/x86_64
make 'MACHTYPE = x86_64'
sudo mkdir /opt/blat
sudo cp ~/bin/x86_64/* /opt/blat/
安装好再把/opt/blat
加到$PATH
中。 解决了各种依赖关系就可以准备安装:
./configure --prefix=/opt/amos
make
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/CelMsg -I../../src/Slice -I../../src/Common -I../../src/AMOS -I../../src/GNU -I../../src/Foundation -g -O2 -MT find-tandem.o -MD -MP -MF .deps/find-tandem.Tpo -c -o find-tandem.o find-tandem.cc
find-tandem.cc: In function ‘int main(int, char**)’:
find-tandem.cc:245:3: error: ‘optarg’ was not declared in this scope
optarg = NULL;
^
find-tandem.cc:247:63: error: ‘getopt’ was not declared in this scope
while (!errflg && ((ch = getopt (argc, argv, "f:u:l:x:m:k:h")) != EOF))
^
find-tandem.cc:260:55: error: ‘optopt’ was not declared in this scope
fprintf (stderr, "Unrecognized option -%c\n", optopt);
^
Makefile:918: recipe for target 'find-tandem.o' failed
make[3]: *** [find-tandem.o] Error 1
make[3]: Leaving directory '/home/labuser/ygc/amos-3.1.0/src/Align'
Makefile:325: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/labuser/ygc/amos-3.1.0/src'
Makefile:306: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/labuser/ygc/amos-3.1.0'
Makefile:244: recipe for target 'all' failed
make: *** [all] Error 2
结果还是报错,但原因非常明显,就是没有定义getopt
,于是修改find-tandem.cc
mg src/Align/find-tandem.cc
加入:
#include <getopt.h>
再次make
,则整个世界清净了
make
sudo make install
安装后把/opt/amos/bin
加入到$PATH
中去即可。
2018年更新
上面是我在2015年安装Amos
的过程,实验室的机器用的Ubuntu
,过程还挺繁琐,因为依赖还蛮多的,对于现在用Arch
的我来说,就再简单不过了,因为Arch
的AUR
上几乎啥软件都有。
aur/amos 3.1.0-3 (+2 0.00%)
A modular, open source whole-genome assembler
要安装Amos
,只需要一条指令:
yay -S amos