This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Breakdancer Compile Error: Regionlimitedbamreader.Hpp:23:5: Error: ‘Bam_Iter_T’ Does Not Name A Type

I tried to get the latest version from github and release 1.4.1 of breakdancer to run but all my attempts failed with this compile error:

I followed the INSTALL.md file. Make of samtools works. cmake of breakdancer works. Make of breakdancer gives the following error:

/home/william/Downloads/breakdancer-1.4.1/src/lib/breakdancer/RegionLimitedBamReader.hpp:23:5: error: ‘bam_iter_t’ does not name a type

It seems like the a iterator variable is used of type ‘bam_iter_t' which is not a known type. See the part of code below. bam_iter_t is also not defined in the object that are included.

\#include "IBamReader.hpp"
\#include "BamReader.hpp"

\#include <boost/format.hpp>
\#include <stdexcept>
\#include <string>

template<typename Filter>
class RegionLimitedBamReader : public BamReader<Filter> {
public:
RegionLimitedBamReader(std::string const& path, char const* region);
~RegionLimitedBamReader();

int next(bam1_t* entry);

int tid() const { return _tid; }
int beg() const { return _beg; }
int end() const { return _end; }

protected:
std::string _region;
bam_index_t* _index;
bam_iter_t _iter;
int _tid;
int _beg;
int _end;
};
breakdancer

Which version of Samtools are you compiling against?

I followed the INSTALL.md file and downloaded samtools-0.1.6 from the given link, untarred it, build it, and exported it as the samtools root. RegionLimitedBamReader.hpp is not including anything from samtools so I don't expect the error to be related with samtools?

Can you try linking to a newer samtools like 0.1.19? I believe even though this file isn't linking to samtools explicitly, that type is only present in newer versions.

1 answer

The INSTALL.md file of breakdancer is out of date.

Instead of downloading samtools-0.1.6.tar.bz2 you should download samtools-0.1.19.tar.bz2.

The rest of the installation worked for me after changing this.

Log in to answer this question.