]> git.donarmstrong.com Git - mothur.git/blobdiff - phylotypecommand.cpp
added pcr.seqs command. fixed bug in rarefacftion.single that caused parsing error...
[mothur.git] / phylotypecommand.cpp
index f402f2a8ab15a1808a461d376818d97d98c5c5c7..2d2db08a40ea5e1aa8712902dcd419ddb1ad757a 100644 (file)
@@ -232,6 +232,7 @@ int PhylotypeCommand::execute(){
                                
                                ListVector list;
                                list.setLabel(level);
+                
                                //go through nodes and build listvector 
                                for (itCurrent = currentNodes.begin(); itCurrent != currentNodes.end(); itCurrent++) {
                        
@@ -244,6 +245,7 @@ int PhylotypeCommand::execute(){
                                        //make the names compatable with listvector
                                        string name = "";
                                        for (int i = 0; i < names.size(); i++) {  
+                        
                         if (names[i] != "unknown") {
                             if (namefile != "") {      
                                 map<string, string>::iterator itNames = namemap.find(names[i]);  //make sure this name is in namefile
@@ -255,9 +257,8 @@ int PhylotypeCommand::execute(){
                         }
                                        }
                                        name = name.substr(0, name.length()-1);  //rip off extra ','
-                                       
                                        //add bin to list vector
-                                       list.push_back(name);
+                                       if (name != "") { list.push_back(name); } //caused by unknown
                                }       
                                
                                //print listvector