X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=readtreecommand.cpp;h=a11465d669a55de0c5555f616c36f51caef74ea2;hb=5a1e62397b91f57d0d3aff635891df04b8999a88;hp=09f899b947bf9bb4b455de86479d34ffa709d46f;hpb=df92022fc75c08b91cefa2c6ca4fd7b23eb480b0;p=mothur.git diff --git a/readtreecommand.cpp b/readtreecommand.cpp index 09f899b..a11465d 100644 --- a/readtreecommand.cpp +++ b/readtreecommand.cpp @@ -87,7 +87,7 @@ ReadTreeCommand::ReadTreeCommand(string option){ namefile = validParameter.validFile(parameters, "name", true); if (namefile == "not open") { abort = true; } - else if (namefile == "not found") { treefile = ""; } + else if (namefile == "not found") { namefile = ""; } else { readNamesFile(); } if (abort == false) { @@ -162,6 +162,7 @@ int ReadTreeCommand::execute(){ if (it == nameMap.end()) { mothurOut(treeMap->namesOfSeqs[i] + " is in your groupfile and not in your tree. It will be disregarded."); mothurOutEndLine(); treeMap->removeSeq(treeMap->namesOfSeqs[i]); + i--; //need this because removeSeq removes name from namesOfSeqs } } }