]> git.donarmstrong.com Git - mothur.git/blobdiff - getseqscommand.cpp
changed groupfile in classify.seqs to reflect multiple fasta files
[mothur.git] / getseqscommand.cpp
index 7535e65ed39065f3a5788c07a6a2e0580f576aaa..7fdf6ed7084463b4e875c8fa01a4e4f9b13db513 100644 (file)
@@ -123,6 +123,7 @@ GetSeqsCommand::GetSeqsCommand(string option)  {
                        
                        int okay = 2;
                        if (outputDir != "") { okay++; }
+                       if (inputDir != "")     { okay++; }
                        
                        if (parameters.size() > okay) { m->mothurOut("You may only enter one of the following: fasta, name, group, alignreport or listfile."); m->mothurOutEndLine(); abort = true;  }
                }
@@ -277,10 +278,13 @@ int GetSeqsCommand::readList(){
                                }
                        
                                //get last name
-                               if (names.count(binnames) == 1) {  newNames += binnames;  }
+                               if (names.count(binnames) == 1) {  newNames += binnames + ",";  }
 
                                //if there are names in this bin add to new list
-                               if (newNames != "") {  newList.push_back(newNames);     }
+                               if (newNames != "") { 
+                                       newNames = newNames.substr(0, newNames.length()-1); //rip off extra comma
+                                       newList.push_back(newNames);    
+                               }
                        }
                                
                        //print new listvector