sga
sga copied to clipboard
cannot configure with bamtools
Cloned today and found two issues with 'configure':
File 'configure' line 5879 does not specify a path for the bamtools file 'api/BamReader.h', so it will never be able to figure out that bamtools is installed. I had to prefix it with "$with_bamtools/include/"
Also, line 2314 change 'thne' to 'then'
Thanks, Ariel
Hi Ariel,
The configure
script is automatically generated by autoconf
from the input file configure.ac
- you should not have to edit it directly. What error messages does ./configure --with-bamtools=/path/to/lib
give?
Thanks for the report, Jared
Hi Jared,
It was just the vanilla “bamtools library must be installed” error message.
In the configure file that I got, line 5879 just says, “for ac_header in api/BamReader.h”, and if I echo a pwd on the line above, it is still in the sga/src directory – not where api/BamReader.h resides – so I had to edit it to point to the $with_bamtools location. Do I need to specify the bamtools path to autogen.sh in order for it to get into the configure file? Or what else was missing? I am following the instructions on github:
git clone https://github.com/jts/sga.git
cd sga/src
./autogen.sh
./configure
--with-sparsehash=/n/local/stage/sparsehash/sparsehash-2.0.2/
--with-bamtools=/n/core/Bioinformatics/analysis/Yu/4MB_resequencing/Sanger/bams_20150923/strains_16/peaks_realignment/assembly/SGA/bamtools/
--prefix=/n/core/Bioinformatics/analysis/Yu/4MB_resequencing/Sanger/bams_20150923/strains_16/peaks_realignment/assembly/SGA/sga/install
Thanks, Ariel
From: Jared Simpson [mailto:[email protected]] Sent: Sunday, May 22, 2016 7:45 PM To: jts/sga Cc: Paulson, Ariel; Author Subject: Re: [jts/sga] cannot configure with bamtools (#117)
Hi Ariel,
The configure script is automatically generated by autoconf from the input file configure.ac - you should not have to edit it directly. What error messages does ./configure --with-bamtools=/path/to/lib give?
Thanks for the report, Jared
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/jts/sga/issues/117#issuecomment-220866909
Hi Ariel,
I'm just back from a trip, sorry for the slow response.
Can you show the contents of your bamtools directory?
ls /n/core/Bioinformatics/analysis/Yu/4MB_resequencing/Sanger/bams_20150923/strains_16/peaks_realignment/assembly/SGA/bamtools/
In reply to OP:
- As @jts points out,
configure
is a generated file, and as such, line numbers are meaningless. The reason is that they might differ slightly depending on how it is generated (byautoconf
). Because of this, it would be better to either refer to line numbers fromconfigure.ac
, or if you must refer toconfigure
, then include a couple of lines of context. - I cannot find the word "thne" anywhere under
src/
:grep -Rl "\<thne\>" /path/to/sga/src
doesn't return anything. If you did find it, this suggests you might have edited the file inadvertently, which in itself could explain some errors. - Regarding the test for
api/BamReader.h
: The test is generated from: https://github.com/jts/sga/blob/master/src/configure.ac#L128 That test is takingCPPFLAGS
into account, which is set on line: https://github.com/jts/sga/blob/master/src/configure.ac#L97 and which is expected to contain the BamTools include path (in$bamtools_include
), from which that file can be found. To check thatCPPFLAGS
is correctly used, look insideconfig.log
after invokingconfigure --with-bamtools=[...]
(even after a failed run), and search forBamReader
. You will see the correspondingg++
invocations. Thus, there should not be a full path to that file included in the test, because that would defeat the purpose of the test, which is to check the default compilation flags are able to correctly locate BamTools headers. So, more likely there might be a problem with the BamTools installation- did you install it following its instructions?
I was just running into the very same problem. In the end I used one of the many bamtools installations coming with another tool (in my case bedtools or WHAM). There the bamtools folder contain the folders bin include and src and the SGA configuration works. Using any new bamtools installation did not work, whatever folder inside the install I was specifying. The folder structure is totally different and I assume thatswhy the config breaks.
However, even tho the configuration worked, I never was able to compile sga.
make[2]: Entering directory '/opt/sga.github.2018/src/Algorithm'
g++ -DHAVE_CONFIG_H -I. -I.. -I../Bigraph -I../Util -I../StringGraph -I../SQG -I../SuffixTools -I../Thirdparty -I../GraphDiff -I../Concurrency -fopenmp -I/opt/bedtools2-2.27.1/src/utils/BamTools/include -I/opt/bedtools2-2.27.1/src/utils/BamTools/include/bamtools -Wall -Wextra -Wno-unknown-pragmas -std=c++98 -O3 -MT libalgorithm_a-ErrorCorrectProcess.o -MD -MP -MF .deps/libalgorithm_a-ErrorCorrectProcess.Tpo -c -o libalgorithm_a-ErrorCorrectProcess.o test -f 'ErrorCorrectProcess.cpp' || echo './'
ErrorCorrectProcess.cpp
In file included from ../Concurrency/SequenceProcessFramework.h:11:0,
from ErrorCorrectProcess.h:15,
from ErrorCorrectProcess.cpp:10:
../Concurrency/ThreadWorker.h:27:27: error: expected ‘)’ before ‘’ token
ThreadWorker(sem_t pReadySem, Processor* pProcessor, const size_t max_items);
^
../Concurrency/ThreadWorker.h:54:9: error: ‘sem_t’ does not name a type
sem_t* m_pReadySem;
^
../Concurrency/ThreadWorker.h:58:9: error: ‘sem_t’ does not name a type
sem_t m_producedSem;
^
../Concurrency/ThreadWorker.h:72:53: error: expected constructor, destructor, or type conversion before ‘(’ token
ThreadWorker<Input, Output, Processor>::ThreadWorker(sem_t* pReadySem,
As of now I am giving up on this.
I occurred this problem, too. First I used apt-get to get the bamtools, using apt-file to search the location and indicated the path /usr/, but it still failed. Then I git cloned the bamtools repository and compiled it with default parameters. The installation directory can be found in std out.(/usr/local/include/bamtools/..) So I change the parameter for configure, and it worked. If you don't need to modify the code of sga, it can be easily installed using conda, so as other packages. :)