Tags
Augustus is a very popular tool for gene annotation, however its installation process can be a bit tricky. For example, if we just download and install Augustus like below, changes are it will not work.
wget http://bioinf.uni-greifswald.de/augustus/binaries/augustus-3.2.3.tar.gz tar xvzf augustus-3.2.3.tar.gz cd augustus-3.2.3 make
You will probably get these errors:
cd auxprogs && make make[1]: Entering directory '/home/jxyue/Tools/augustus-3.2.3/auxprogs' cd bam2hints; make; make[2]: Entering directory '/home/jxyue/Tools/augustus-3.2.3/auxprogs/bam2hints' g++ -Wall -O2 -c bam2hints.cc -o bam2hints.o -I/usr/include/bamtools bam2hints.cc:16:27: fatal error: api/BamReader.h: No such file or directory #include <api/BamReader.h> ^ compilation terminated. Makefile:29: recipe for target 'bam2hints.o' failed make[2]: *** [bam2hints.o] Error 1 make[2]: Leaving directory '/home/jxyue/Tools/augustus-3.2.3/auxprogs/bam2hints' Makefile:7: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/home/jxyue/Tools/augustus-3.2.3/auxprogs' Makefile:7: recipe for target 'all' failed make: *** [all] Error 2
This is because the auxiliary tools, bam2hints and filterBam, depend on the pre-installation of bamtools with proper library path configured.
Therefore, let’s install bamtools first. It will be much easier if we just do system-wide installation like:
sudo apt-get install bamtools libbamtools-dev
However, when we are working with a shared computing server and we do not have the root permission, we mostly likely will need install bamtools under our local directory like below.
git clone git://github.com/pezmaster31/bamtools.git mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/your/path/to/bamtools .. make make install
Now bamtools should have been correctly installed. Next, we need to modify the Makefiles of bam2hints and filterBam to adapt them with our manually installed bamtools.
First, go to the “augustus-3.2.3/auxprogs/bam2hints” directory and make the following changes for the Makefile:
Replace:
INCLUDES = /usr/include/bamtools
By:
INCLUDES = $(BAMTOOLS)/include/bamtools
Replace:
LIBS = -lbamtools -lz
By:
LIBS = $(BAMTOOLS)/lib64/libbamtools.a -lz
Then, go to the “augustus-3.2.3/auxprogs/filterBam/src” directory and make the following changes for the 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
Now, we are finally ready to compile Augustus. Get back to the “augustus-3.2.3” directory and type “make BAMTOOLS=/your/path/to/bamtools”, viola!
References
https://github.com/pezmaster31/bamtools/wiki/Building-and-installing
It worked, thank you so much for this! I couldn’t figure out how to manually set the libbamtools library before reading this. augustus and BUSCO are now running smoothly.
Hi Katherine, you are very welcome! I am glad that my posts can be helpful to others! :)
I still got the same error even though I followed the steps thoroughly :(
Hi kyou,
In case you cannot figure out the cause of the problem, you might want to check a pipeline tool LRSDAY (https://github.com/yjx1217/LRSDAY) that I recently developed, in which augustus will be automatically set up, although together with many other tools. You can find out the details of the installation commands that I used for augustus in the install_dependencies.sh script shipped with LRSDAY. Hope this can help!
Thanks for the quick response. Will definitely try it. Thank you!
Pingback: Augustus-3.3的安装 | FL的生信笔记
Hello!
Thanks! It didn’t work at first mostly because newer versions of Bamtools have changed the paths of their files.
I installed an older version and it worked!
Pingback: Conda Installation and Setting Up Environment for BRAKER2 – Max John's ELN
Thank you for creating this guide; it was very helpful!
Pingback: Augustus installation error – IrisChang
Thank you so much, but I failed. I followed all the steps and even re-install bamtools. Still got the error
Hi, I’ve implemented the automatic installation process for Maker in the software that I developed (LRSDAY; https://github.com/yjx1217/LRSDAY). Please check the install_dependencies.sh file in the depository and find the section corresponding to Maker (augustus installation is included). Hope this can help! ~