Augustus安装教程

Augustus是一个使用频率很高的程序,但是安装却麻烦的一批,而且说明书对新手也很不友好;

网上倒是有很多安装的解答,可能是每个机子的情况不太一样,没有一个讲的比较全面的,所以帮助也有限。

最近又重新试了一遍,终于搞明白之前安装问题出在哪里,于是记录一下,希望对大家有帮助。

  • 下载
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注释掉(现在的版本基本都是注释掉的,不过最好检查一下)
make
  • 问题出现
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
  • 继续运行,但是又出现新的报错
bam2wig.c:18:17: fatal error: sam.h: No such file or directory
  • 这次问题出现在bam2wig,原因是还有其它依赖程序没有安装
cd augustus-3.3.2/auxprogs/bam2wig
less README.txt #发现还有四个依赖程序没有装,为了方便都装在一个目录下

回到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 ..

安装结束后
export TOOLDIR=/home/software/samtools
make BAMTOOLS=/your/path/to/bamtools
  • 再运行,又出现新的报错
../src/Compute_UTRs.hpp:16:33: fatal error: boost/tuple/tuple.hpp: No such file or directory
  • 这里显示缺少boost,那就继续安装
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
  • 再次运行,成功了!!

参考:

https://iamphioxus.org/2017/05/08/installing-augustus-with-manual-bamtools-installation/
https://github.com/pezmaster31/bamtools/wiki/Building-and-installing

你可能感兴趣的:(Augustus安装教程)