X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=readblast.cpp;h=84fddcf263cfdeb572f72ff3bd658325f31271e0;hp=5f2441515378031891c78d2fbb809c816e885cec;hb=cf9987b67aa49777a4c91c2d21f96e58bf17aa82;hpb=f687723a8357916e86a05116978e6869b039ce36 diff --git a/readblast.cpp b/readblast.cpp index 5f24415..84fddcf 100644 --- a/readblast.cpp +++ b/readblast.cpp @@ -111,7 +111,7 @@ int ReadBlast::read(NameAssignment* nameMap) { } }else { m->mothurOut("Error in your blast file, cannot read."); m->mothurOutEndLine(); exit(1); } - + //read file while(!fileHandle.eof()){ @@ -193,7 +193,7 @@ int ReadBlast::read(NameAssignment* nameMap) { PDistCell value(itA->second, distance); matrix->addCell(it->first, value); } - }else{ + }else{ outDist << itA->first << '\t' << nameMap->get(it->first) << '\t' << distance << endl; } } @@ -348,7 +348,12 @@ int ReadBlast::readNames(NameAssignment* nameMap) { //is this a new name? if (name != prevName) { prevName = name; - nameMap->push_back(name); + + if (nameMap->get(name) != -1) { m->mothurOut("[ERROR]: trying to exact names from blast file, and I found dups. Are you sequence names unique? quitting.\n"); m->control_pressed = true; } + else { + nameMap->push_back(name); + } + //outName << name << '\t' << name << endl; num++; } }