Augustus是一個使用頻率很高的程序,但是安裝卻麻煩的一批,而且說明書對新手也很不友好呆贿;
網(wǎng)上倒是有很多安裝的解答,可能是每個機(jī)子的情況不太一樣森渐,沒有一個講的比較全面的做入,所以幫助也有限。
最近又重新試了一遍同衣,終于搞明白之前安裝問題出在哪里竟块,于是記錄一下,希望對大家有幫助耐齐。
- 下載
wget -c http://bioinf.uni-greifswald.de/augustus/binaries/augustus.current.tar.gz
- 安裝
tar -xzvf augustus.current.tar.gz
cd augustus-3.3.2
# 打開common.mk文件浪秘,將ZIPINPUT = true注釋掉(現(xiàn)在的版本基本都是注釋掉的,不過最好檢查一下)
make
- 問題出現(xiàn)
bam2hints.cc:16:27: fatal error: api/BamReader.h: No such file or directory
這是因為依賴工具bam2hints和filterBam不存在或者沒有指定正確的路徑埠况;這兩個工具都依托bamtools
- 安裝bamtools
git clone git://github.com/pezmaster31/bamtools.git
cd bamtools
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/your/path/to/bamtools ..
make
make install
- 安裝完之后
1.
cd augustus-3.3.2/auxprogs/bam2hints
vim Makefile
Replace:
INCLUDES = /usr/include/bamtools
By:
INCLUDES = $(BAMTOOLS)/include/bamtools
Replace:
LIBS = -lbamtools -lz
By:
LIBS = $(BAMTOOLS)/lib64/libbamtools.a -lz
2.
cd augustus-3.3.2/auxprogs/filterBam/src
vim Makefile
Replace:
BAMTOOLS = /usr/include/bamtools
By:
# BAMTOOLS = /usr/include/bamtools
Replace:
INCLUDES = -I$(BAMTOOLS) -Iheaders -I./bamtools
By:
INCLUDES = -I$(BAMTOOLS)/include/bamtools -Iheaders -I./bamtools
Replace:
LIBS = -lbamtools -lz
By:
LIBS = $(BAMTOOLS)/lib64/libbamtools.a -lz
3.
然后返回augustus-3.3.2
make BAMTOOLS=/your/path/to/bamtools
- 繼續(xù)運(yùn)行秫逝,但是又出現(xiàn)新的報錯
bam2wig.c:18:17: fatal error: sam.h: No such file or directory
- 這次問題出現(xiàn)在bam2wig,原因是還有其它依賴程序沒有安裝
cd augustus-3.3.2/auxprogs/bam2wig
less README.txt #發(fā)現(xiàn)還有四個依賴程序沒有裝询枚,為了方便都裝在一個目錄下
回到software目錄
mkdir samtools
git clone https://github.com/samtools/htslib.git
cd htslib
autoheader
autoconf
./configure --prefix=/home/software/samtools/htslib
make
make install
cd ..
git clone https://github.com/samtools/bcftools.git
cd bcftools
autoheader
autoconf
./configure --prefix=/home/software/samtools/bcftools
make
make install
cd ..
git clone https://github.com/samtools/tabix.git
cd tabix
make
cd ..
git clone https://github.com/samtools/samtools.git
cd samtools
autoheader
autoconf -Wno-syntax
./configure --prefix=/home/software/samtools/samtools
make
make install
cd ..
安裝結(jié)束后
export TOOLDIR=/home/software/samtools
make BAMTOOLS=/your/path/to/bamtools
- 再運(yùn)行违帆,又出現(xiàn)新的報錯
../src/Compute_UTRs.hpp:16:33: fatal error: boost/tuple/tuple.hpp: No such file or directory
- 這里顯示缺少boost,那就繼續(xù)安裝
mkdir boost_1.69
wget https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz
tar zxf boost_1_69_0.tar.gz
cd boost_1_69_0
mkdir build
./bootstrap.sh --prefix=/path/to/boost_1.69_0/build
./b2 install
- 完成安裝后修改subdir.mk來指定路徑
cd augustus-3.3.2/auxprogs/utrrnaseq/Debug/src
vim subdir.mk
在最下面
Replace:
g++ -I/usr/include/boost -O0 -g3 -pedantic -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
By:
g++ -I/home/software/boost_1.69/boost_1_69_0 -O0 -g3 -pedantic -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
然后返回augustus-3.3.2
make BAMTOOLS=/your/path/to/bamtools
- 再次運(yùn)行金蜀,成功了K⒑蟆!
參考:
https://iamphioxus.org/2017/05/08/installing-augustus-with-manual-bamtools-installation/
https://github.com/pezmaster31/bamtools/wiki/Building-and-installing