diff --git a/src/Makevars.in b/src/Makevars.in index 61631ba..8f3085b 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -1,4 +1,3 @@ PKG_LIBS=@LIBS@ -lz -PKG_CFLAGS=-I./ -D_FASTMAP -DMAQ_LONGREADS @HAVE_LIBBZ2@ -PKG_CXXFLAGS=-I./ -D_FASTMAP -DMAQ_LONGREADS @HAVE_LIBBZ2@ @BOOST_CPPFLAGS@ - +PKG_CFLAGS=-I./ -D_FASTMAP -DMAQ_LONGREADS -std=c++11 @HAVE_LIBBZ2@ +PKG_CXXFLAGS=-I./ -D_FASTMAP -DMAQ_LONGREADS -std=c++11 @HAVE_LIBBZ2@ @BOOST_CPPFLAGS@ diff --git a/src/bed2vector.cpp b/src/bed2vector.cpp index 63e9499..f0e5f00 100644 --- a/src/bed2vector.cpp +++ b/src/bed2vector.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -31,7 +30,6 @@ ssize_t getline_local(char **lineptr, size_t *n, FILE *stream); } using namespace std; -using namespace __gnu_cxx; class lessAbsoluteValue { @@ -115,7 +113,7 @@ SEXP read_bed_ends(SEXP filename) { vector< vector > pos; // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; typedef boost::tokenizer > tokType; @@ -160,7 +158,7 @@ SEXP read_bed_ends(SEXP filename) { } // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -251,7 +249,7 @@ SEXP read_meland_old(SEXP filename) { vector< vector > poslen; // length // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -293,7 +291,7 @@ SEXP read_meland_old(SEXP filename) { int fpos=atoi(str_pos.c_str()); // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -429,7 +427,7 @@ SEXP read_meland_old(SEXP filename) { vector< vector > tagnames; // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -473,7 +471,7 @@ SEXP read_meland_old(SEXP filename) { int fpos=atoi(str_pos.c_str()); // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -621,7 +619,7 @@ SEXP read_eland_mismatches(SEXP filename) { vector< vector > mm2; // position of the second mismatch // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -689,7 +687,7 @@ SEXP read_eland_mismatches(SEXP filename) { } // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -814,7 +812,7 @@ SEXP read_eland_mismatches(SEXP filename) { vector< vector > tagnames; // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -865,7 +863,7 @@ SEXP read_eland_mismatches(SEXP filename) { } // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -1001,7 +999,7 @@ SEXP read_eland_mismatches(SEXP filename) { vector< vector > tagnames; // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -1075,7 +1073,7 @@ SEXP read_eland_mismatches(SEXP filename) { } // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -1210,7 +1208,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ vector< vector > tagnames; // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -1363,7 +1361,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ } // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -1497,7 +1495,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ vector< vector > tagnames; // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -1572,7 +1570,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -1711,7 +1709,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ vector< vector > tagnames; // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -1789,7 +1787,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ int nm=atoi(str_ndel.c_str())+atoi(str_nins.c_str())+atoi(str_nsub.c_str()); // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -1938,7 +1936,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ vector< vector > tagnames; // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -1981,7 +1979,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ } // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -2116,7 +2114,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ vector< vector > posnm; // number of mismatches // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -2158,7 +2156,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ int nm=atoi(str_qual.c_str()); // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -2267,7 +2265,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ vector< vector > posnm; // number of mismatches // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -2326,7 +2324,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome @@ -2438,7 +2436,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ vector< vector > poslen; // length of the match // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -2527,7 +2525,7 @@ SEXP read_eland_multi(SEXP filename,SEXP read_tag_names_R,SEXP eland_tag_length_ // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome diff --git a/src/maqread.cpp b/src/maqread.cpp index 896068f..999f07d 100644 --- a/src/maqread.cpp +++ b/src/maqread.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -20,7 +19,6 @@ extern "C" { } using namespace std; -using namespace __gnu_cxx; class lessAbsoluteValue { @@ -55,7 +53,7 @@ extern "C" { vector< vector > tagnames; // chromosome map - hash_map,equal_to > cind_map; + unordered_map,equal_to > cind_map; vector cnames; @@ -89,7 +87,7 @@ extern "C" { // determine the chromosome index - hash_map,equal_to >::const_iterator li=cind_map.find(chr); + unordered_map,equal_to >::const_iterator li=cind_map.find(chr); int cind=-1; if(li==cind_map.end()) { // register new chromosome diff --git a/src/pc.h b/src/pc.h index 3611c97..b77cd4a 100644 --- a/src/pc.h +++ b/src/pc.h @@ -1,17 +1,6 @@ #ifndef PC_H #define PC_H 1 #include -#include - -namespace __gnu_cxx -{ - template<> struct hash< std::string > - { - size_t operator()( const std::string& x ) const - { - return hash< const char* >()( x.c_str() ); - } - }; -} - +#include +#include #endif diff --git a/src/peaks.cpp b/src/peaks.cpp index 37770d5..b55824f 100644 --- a/src/peaks.cpp +++ b/src/peaks.cpp @@ -14,7 +14,6 @@ extern "C" { } using namespace std; -using namespace __gnu_cxx; /** * Calculate all local peaks diff --git a/src/wdl.cpp b/src/wdl.cpp index 18a2258..fd4f1c1 100644 --- a/src/wdl.cpp +++ b/src/wdl.cpp @@ -14,7 +14,6 @@ extern "C" { } using namespace std; -using namespace __gnu_cxx; //#define DEBUG 1