X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=readcolumn.cpp;h=e14125cc6d94f563e37d5ea1cea8235a5c8df04b;hp=83d11c92221bcb3ffbb46ea097cff26b29cd0b6c;hb=050a3ff02473a3d4c0980964e1a9ebe52e55d6b8;hpb=f687723a8357916e86a05116978e6869b039ce36 diff --git a/readcolumn.cpp b/readcolumn.cpp index 83d11c9..e14125c 100644 --- a/readcolumn.cpp +++ b/readcolumn.cpp @@ -48,7 +48,11 @@ int ReadColumnMatrix::read(NameAssignment* nameMap){ while(fileHandle && lt == 1){ //let's assume it's a triangular matrix... - fileHandle >> firstName >> secondName >> distance; // get the row and column names and distance + fileHandle >> firstName; m->gobble(fileHandle); + fileHandle >> secondName; m->gobble(fileHandle); + fileHandle >> distance; // get the row and column names and distance + + if (m->debug) { cout << firstName << '\t' << secondName << '\t' << distance << endl; } if (m->control_pressed) { fileHandle.close(); delete reading; return 0; } @@ -106,7 +110,9 @@ int ReadColumnMatrix::read(NameAssignment* nameMap){ m->openInputFile(distFile, fileHandle); //let's start over while(fileHandle){ - fileHandle >> firstName >> secondName >> distance; + fileHandle >> firstName; m->gobble(fileHandle); + fileHandle >> secondName; m->gobble(fileHandle); + fileHandle >> distance; // get the row and column names and distance if (m->control_pressed) { fileHandle.close(); delete reading; return 0; } @@ -167,8 +173,10 @@ int ReadColumnMatrix::read(CountTable* countTable){ while(fileHandle && lt == 1){ //let's assume it's a triangular matrix... - fileHandle >> firstName >> secondName >> distance; // get the row and column names and distance - + fileHandle >> firstName; m->gobble(fileHandle); + fileHandle >> secondName; m->gobble(fileHandle); + fileHandle >> distance; // get the row and column names and distance + if (m->control_pressed) { fileHandle.close(); delete reading; return 0; } int itA = countTable->get(firstName); @@ -224,7 +232,9 @@ int ReadColumnMatrix::read(CountTable* countTable){ m->openInputFile(distFile, fileHandle); //let's start over while(fileHandle){ - fileHandle >> firstName >> secondName >> distance; + fileHandle >> firstName; m->gobble(fileHandle); + fileHandle >> secondName; m->gobble(fileHandle); + fileHandle >> distance; // get the row and column names and distance if (m->control_pressed) { fileHandle.close(); delete reading; return 0; }