]> git.donarmstrong.com Git - mothur.git/blobdiff - readtreecommand.cpp
working on chimeras
[mothur.git] / readtreecommand.cpp
index 09f899b947bf9bb4b455de86479d34ffa709d46f..a11465d669a55de0c5555f616c36f51caef74ea2 100644 (file)
@@ -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
                                        }
                                }
                        }