X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=phylotypecommand.cpp;h=f402f2a8ab15a1808a461d376818d97d98c5c5c7;hb=a626c629e4d4840cd2ce04d98055dcfef1f8593a;hp=1d6c391de69c83a86971873577a0df0b21efdbcd;hpb=597560b3c23f03d0069082cf096ce65e0c087519;p=mothur.git diff --git a/phylotypecommand.cpp b/phylotypecommand.cpp index 1d6c391..f402f2a 100644 --- a/phylotypecommand.cpp +++ b/phylotypecommand.cpp @@ -244,13 +244,15 @@ int PhylotypeCommand::execute(){ //make the names compatable with listvector string name = ""; for (int i = 0; i < names.size(); i++) { - if (namefile != "") { - map::iterator itNames = namemap.find(names[i]); //make sure this name is in namefile - - if (itNames != namemap.end()) { name += namemap[names[i]] + ","; } //you found it in namefile - else { m->mothurOut(names[i] + " is not in your namefile, please correct."); m->mothurOutEndLine(); exit(1); } - - }else{ name += names[i] + ","; } + if (names[i] != "unknown") { + if (namefile != "") { + map::iterator itNames = namemap.find(names[i]); //make sure this name is in namefile + + if (itNames != namemap.end()) { name += namemap[names[i]] + ","; } //you found it in namefile + else { m->mothurOut(names[i] + " is not in your namefile, please correct."); m->mothurOutEndLine(); exit(1); } + + }else{ name += names[i] + ","; } + } } name = name.substr(0, name.length()-1); //rip off extra ','