/***********************************************************************/
FormatColumnMatrix::FormatColumnMatrix(string df) : filename(df){
/***********************************************************************/
FormatColumnMatrix::FormatColumnMatrix(string df) : filename(df){
fileHandle >> firstName >> secondName >> distance; // get the row and column names and distance
map<string,int>::iterator itA = nameMap->find(firstName);
map<string,int>::iterator itB = nameMap->find(secondName);
fileHandle >> firstName >> secondName >> distance; // get the row and column names and distance
map<string,int>::iterator itA = nameMap->find(firstName);
map<string,int>::iterator itB = nameMap->find(secondName);
- if(itA == nameMap->end()){ cerr << "AAError: Sequence '" << firstName << "' was not found in the names file, please correct\n"; exit(1); }
- if(itB == nameMap->end()){ cerr << "ABError: Sequence '" << secondName << "' was not found in the names file, please correct\n"; exit(1); }
+ if(itA == nameMap->end()){ m->mothurOut("AAError: Sequence '" + firstName + "' was not found in the names file, please correct\n"); exit(1); }
+ if(itB == nameMap->end()){ m->mothurOut("ABError: Sequence '" + secondName + "' was not found in the names file, please correct\n"); exit(1); }
}else{ squareFile = tempOutFile; }
//sort file by first column so the distances for each row are together
}else{ squareFile = tempOutFile; }
//sort file by first column so the distances for each row are together