rwtourdot / linker

Tools for analyzing long and linked read sequencing
5 stars 3 forks source link

read_bam.h - missing include? #2

Open keiranmraine opened 4 years ago

keiranmraine commented 4 years ago

Hi,

While building the codebase I found that I had to add the following include to src/read_bam.h:

#include <cmath>

Error without was:

src/read_bam.cpp: In function ‘void connect_assembly_bam_pileup(std::__cxx11::string, bx_map&, read_graph&, int, full_map&, std::unordered_map<std::__cxx11::basic_string<char>, int>&)’:
src/read_bam.cpp:315:43: error: ‘floor’ is not a member of ‘std’
                          int index = std::floor(al.Position/binsize);  // this int needs to be converted to a string
                                           ^~~~~
Makefile:60: recipe for target 'src/read_bam.o' failed

My build script was as follows:

# date of commit as no versions (YYYY.MM.DD)
export VERSION=2019.11.17 
export COMMIT_ID=d7a0b5b6f6175fd8d4ca5540ae0445c044b477ed
export HTSLIB_VER=1.9
export BAMTOOLS_VER=v2.5.1
export PROG_NAME=linker
export PREFIX=/software/modules/installs/$PROG_NAME/$PROG_NAME-$VERSION

mkdir -p $PREFIX
cd $PREFIX
curl -L https://github.com/rwtourdot/$PROG_NAME/archive/$COMMIT_ID.tar.gz | tar -zx --strip-components 1
cd htslib
curl -L https://github.com/samtools/htslib/archive/$HTSLIB_VER.tar.gz | tar -zx --strip-components 1
autoheader
autoconf
./configure --prefix=$PREFIX/packages/htslib/
make
make install
cd ..
cd bamtools
curl -L https://github.com/pezmaster31/bamtools/archive/$BAMTOOLS_VER.tar.gz | tar -zx --strip-components 1
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX/packages/bamtools/ ..
make
make install
cd ../..
make
rwtourdot commented 4 years ago

thank you for the build script, a few things to fix