I'm trying to compile AUGUSTUS on my mac (10.10.4) and I fail to compile bam2hints and filterBam executables.
I get this error:
g++ -Wall -O2 -c bam2hints.cc -o bam2hints.o -I/usr/include/bamtools
bam2hints.cc:16:10: fatal error: 'api/BamReader.h' file not found
include <api bamreader.h="">
You have to make changes to the Makefiles for both bam2hints and filterBam to explicitly state where your bamtools installation files are. The easier way to install is to use homebrew.
To manually edit the makefiles you will need to add the following to the auxprogs/filterBam/src/Makefile:
BAMTOOLS = /your/path/to/bamtools
And then also make sure that under the INCLUDE variable that it is pointing to the correct folder that houses the api/bamreader.h. For example, if you installed bamtools from home-brew, the includes are in a slightly different place.
You also need to edit the path to the BAMTOOLS variable in the auxprogs/bam2hints/Makefile.
Given all of this, I still have had problems getting Augustus to install correctly, lately I've had problems using the --proteinprofile functionality - and I think some of the issues are compilation specific, i.e. just seem to happen on Mac and not Linux.
Just thought it may be useful to others, I put my comment here. In my case, gcc version also matters. gcc4.8 works for bam2hints but not filterbam. I used gcc5.4 to compile filterbam successfully.
Thanks Jon for the advice! I was able to compile bam2hits and filterBam successfully and it appears that augustus is working properly.
Just thought it may be useful to others, I put my comment here. In my case, gcc version also matters. gcc4.8 works for bam2hints but not filterbam. I used gcc5.4 to compile filterbam successfully.
I had a similar error, and in the end, I found a detailed step-by-step manual to correct this error, which is based on this answer.
Edit: After following this manual, it gave me the same error, but at least it seems like I can run the program from the augustus/src/ directory.
I've edited the makefile (filterbam/src)as you mentioned, but again it shows the same error.
I had the similar error, and I finally solved it by installing Augustus via conda.