diff --git a/bin/closestBed b/bin/closestBed index 35d70be49ad91bad54626e23602cb048943d23ce..8dcadbe43f92cada60544c77307680657be9c398 100755 Binary files a/bin/closestBed and b/bin/closestBed differ diff --git a/bin/complementBed b/bin/complementBed index c8d384dc2161b129c4ed8f448e92fb8b4a045684..436d0c368177fa078720f22be981eae30cdd37b4 100755 Binary files a/bin/complementBed and b/bin/complementBed differ diff --git a/bin/coverageBed b/bin/coverageBed index 18ae2efe691d920904801cc200bf7e71302eca54..131fcd3846ead0a86ae9dc538ad3a4291e6cb460 100755 Binary files a/bin/coverageBed and b/bin/coverageBed differ diff --git a/bin/fastaFromBed b/bin/fastaFromBed index 643c2245abbb4d37196bacd2bf4d710a7df7537f..7930d63a977de3b58a995adc0adafb7e54179b00 100755 Binary files a/bin/fastaFromBed and b/bin/fastaFromBed differ diff --git a/bin/genomeCoverageBed b/bin/genomeCoverageBed index 797f2ebe1e492ecd108dab76f6229853b044ee9f..2741cf8645971669cc63518f048da1a15c15c600 100755 Binary files a/bin/genomeCoverageBed and b/bin/genomeCoverageBed differ diff --git a/bin/intersectBed b/bin/intersectBed index 1fbe11f97b7f08588b818bcd0928e65e15f7ce17..eb656379ab4ed2ffe06d5285f82562ede208077d 100755 Binary files a/bin/intersectBed and b/bin/intersectBed differ diff --git a/bin/linksBed b/bin/linksBed index 22ecdcecde9621bf891ef4b17b467a7fe36b7541..45ca248d7c4d5fce259b0def874e60e7eafcfcab 100755 Binary files a/bin/linksBed and b/bin/linksBed differ diff --git a/bin/mergeBed b/bin/mergeBed index b2e5867c0597624b3fb1c87173b7e64cbfbd4121..522bf90b61f5362fd221b3ed525ac77a163d8cd2 100755 Binary files a/bin/mergeBed and b/bin/mergeBed differ diff --git a/bin/peIntersectBed b/bin/peIntersectBed index 31af0686da1ccb1f4826f44e7c195613758d1bb4..e3e7e8e8d58905b4b1518f953530c02c99c23a76 100755 Binary files a/bin/peIntersectBed and b/bin/peIntersectBed differ diff --git a/bin/sortBed b/bin/sortBed index bf5b77830cdc2baac70b60e6799aebd2d93d6201..ff2202b18758e4c6ef8c7b4e1fbe854626b3da03 100755 Binary files a/bin/sortBed and b/bin/sortBed differ diff --git a/bin/subtractBed b/bin/subtractBed index 8df9312e8ef1a7122fffd623c69f7f38416618c1..29b078dddb2249e98d67e9c7662e937d1cecb901 100755 Binary files a/bin/subtractBed and b/bin/subtractBed differ diff --git a/bin/windowBed b/bin/windowBed index cb677244212e0e848d620ed3bd9a947492daeea8..e9b3ac938b4bcf528f94f4447e452e08d80efa08 100755 Binary files a/bin/windowBed and b/bin/windowBed differ diff --git a/obj/bedFile.o b/obj/bedFile.o index f28d86768e9c994dcb903e26b7c38016ccfb7bef..bb306a5e9703e7b6b4ff46b278b05e95f3616011 100644 Binary files a/obj/bedFile.o and b/obj/bedFile.o differ diff --git a/src/utils/bedFile/bedFile.cpp b/src/utils/bedFile/bedFile.cpp index 3c686def991ee8365e93441d1880b1c697f1a215..017a2a9ef485a2432253a3b5aa8a5fa71e005e94 100755 --- a/src/utils/bedFile/bedFile.cpp +++ b/src/utils/bedFile/bedFile.cpp @@ -376,12 +376,11 @@ void BedFile::loadBedFileIntoMapNoBin() { while (getline(bed, bedLine)) { - if ((bedLine.find_first_of("track") == 1) || (bedLine.find_first_of("browser") == 1)) { + if ((bedLine.find("track") != string::npos) || (bedLine.find("browser") != string::npos)) { continue; } else { Tokenize(bedLine,bedFields); - lineNum++; if (parseBedLine(bedEntry, bedFields, lineNum)) { @@ -398,7 +397,7 @@ void BedFile::loadBedFileIntoMapNoBin() { while (getline(cin, bedLine)) { - if ((bedLine.find_first_of("track") == 1) || (bedLine.find_first_of("browser") == 1)) { + if ((bedLine.find("track") != string::npos) || (bedLine.find("browser") != string::npos)) { continue; } else { diff --git a/src/utils/bedFile/bedFile.h b/src/utils/bedFile/bedFile.h index 55a48e2570fa5b3024d9b67131a5cc880dac4947..98d1b96abb93c58df1d96ecc993ebd6f8de83c6a 100755 --- a/src/utils/bedFile/bedFile.h +++ b/src/utils/bedFile/bedFile.h @@ -9,6 +9,7 @@ #include <sstream> #include <cstring> #include <algorithm> +#include <limits.h> using namespace std; diff --git a/src/utils/lineFileUtilities/lineFileUtilities.cpp b/src/utils/lineFileUtilities/lineFileUtilities.cpp index c5dd1e6ce6256a60c572f2cdb459a05e106d4a64..872637907f36d8ca21ceb6675a5bc2f6b37c45a0 100755 --- a/src/utils/lineFileUtilities/lineFileUtilities.cpp +++ b/src/utils/lineFileUtilities/lineFileUtilities.cpp @@ -9,8 +9,6 @@ // #include "lineFileUtilities.h" - - //*********************************************** // lineFileUtilities: // Common Functions @@ -18,6 +16,20 @@ void Tokenize(const string& str, vector<string>& tokens) { + +/* + string::size_type start = 0; + string::size_type end = 0; + + cout << str << endl; + while ((start = str.find_first_not_of(" ", start)) != string::npos) { + end = str.find_first_of(" ", start); + cout << start << ":" << end << endl; + tokens.push_back(str.substr(start, end - start)); + start = end; + } +*/ + // Skip delimiters at beginning. string::size_type lastPos = str.find_first_not_of("\t", 0); // Find first "non-delimiter". @@ -32,6 +44,7 @@ void Tokenize(const string& str, vector<string>& tokens) // Find next "non-delimiter" pos = str.find_first_of("\t", lastPos); } + } diff --git a/src/utils/lineFileUtilities/lineFileUtilities.h b/src/utils/lineFileUtilities/lineFileUtilities.h index febac8db55a3de16ae188a46e1585d8bc4a7490a..53080b225dbd3683175a47c5f13dc1432c62d957 100755 --- a/src/utils/lineFileUtilities/lineFileUtilities.h +++ b/src/utils/lineFileUtilities/lineFileUtilities.h @@ -5,6 +5,7 @@ #include <string> #include <algorithm> + using namespace std; // split a line from a file into a vector of strings. token = "\t"