]> git.donarmstrong.com Git - mothur.git/blobdiff - aligncommand.cpp
fixed clearcut version bug, added group count output to get.groups and remove.groups
[mothur.git] / aligncommand.cpp
index 7bed27f7725f78425a3c2e8f61f528b24b00c830..a820542e42f4d7a7b9956b194f790555e634536a 100644 (file)
@@ -137,8 +137,8 @@ AlignCommand::AlignCommand(string option)  {
                        }else if (templateFileName == "not open") { abort = true; }     
                        
                        candidateFileName = validParameter.validFile(parameters, "candidate", false);
-                       if (candidateFileName == "not found") { m->mothurOut("candidate is a required parameter for the align.seqs command."); m->mothurOutEndLine(); abort = true;  }
-                       else { 
+                       if (candidateFileName == "not found") { 
+                       }else { 
                                m->splitAtDash(candidateFileName, candidateFileNames);
                                
                                //go through files and make sure they are good, if not, then disregard them
@@ -168,7 +168,7 @@ AlignCommand::AlignCommand(string option)  {
                                                }
                                        }
                                        
-                                       //if you can't open it, try default location
+                                       //if you can't open it, try output location
                                        if (ableToOpen == 1) {
                                                if (m->getOutputDir() != "") { //default path is set
                                                        string tryPath = m->getOutputDir() + m->getSimpleName(candidateFileNames[i]);
@@ -463,6 +463,12 @@ int AlignCommand::execute(){
                        m->mothurOutEndLine();
                }
                
+               //set align file as new current fastafile
+               string currentFasta = "";
+               itTypes = outputTypes.find("fasta");
+               if (itTypes != outputTypes.end()) {
+                       if ((itTypes->second).size() != 0) { currentFasta = (itTypes->second)[0]; m->setFastaFile(currentFasta); }
+               }
                
                m->mothurOutEndLine();
                m->mothurOut("Output File Names: "); m->mothurOutEndLine();