X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getoturepcommand.cpp;h=44c58c31d26e66342e7a1bf73feb21f7f3919bfa;hb=def6801aad4aadbbaa7cc615b11554e47dad5ce0;hp=818775fdd7e24678545750fcfad6596efdd666e6;hpb=76f67ac1d1236dde0f7b4689d2d45fecf6d652cf;p=mothur.git diff --git a/getoturepcommand.cpp b/getoturepcommand.cpp index 818775f..44c58c3 100644 --- a/getoturepcommand.cpp +++ b/getoturepcommand.cpp @@ -437,7 +437,7 @@ int GetOTURepCommand::execute(){ delete read; delete input; delete list; globaldata->gListVector = NULL; return 0; } - if (!weighted) { readNamesFile(weighted); } + if ((!weighted) && (namefile != "")) { readNamesFile(weighted); } while((list != NULL) && ((allLines == 1) || (userLabels.size() != 0))) { @@ -565,7 +565,7 @@ void GetOTURepCommand::readNamesFile() { string name, names, sequence; - while(inNames){ + while(!inNames.eof()){ inNames >> name; //read from first column A inNames >> names; //read from second column A,B,C,D @@ -599,7 +599,7 @@ void GetOTURepCommand::readNamesFile(bool w) { string name, names, sequence; - while(inNames){ + while(!inNames.eof()){ inNames >> name; m->gobble(inNames); //read from first column A inNames >> names; //read from second column A,B,C,D