]> git.donarmstrong.com Git - mothur.git/blobdiff - getseqscommand.cpp
fixed bug with shhh.flow from file path name in write functions, added "smart" featur...
[mothur.git] / getseqscommand.cpp
index ffe49b48810d7916e5324efd9480c87e8322ec92..9bf188db3d25fa4ac16b82973a2802c3b1e6ad75 100644 (file)
@@ -206,12 +206,12 @@ GetSeqsCommand::GetSeqsCommand(string option)  {
                        if (accnosfile2 == "not found") { accnosfile2 = ""; }
                        
                        fastafile = validParameter.validFile(parameters, "fasta", true);
-                       if (fastafile == "not open") { abort = true; }
+                       if (fastafile == "not open") { fastafile = ""; abort = true; }
                        else if (fastafile == "not found") {  fastafile = "";  }
                        else { m->setFastaFile(fastafile); }
                        
                        namefile = validParameter.validFile(parameters, "name", true);
-                       if (namefile == "not open") { abort = true; }
+                       if (namefile == "not open") { namefile = ""; abort = true; }
                        else if (namefile == "not found") {  namefile = "";  }  
                        else { m->setNameFile(namefile); }
                        
@@ -230,7 +230,7 @@ GetSeqsCommand::GetSeqsCommand(string option)  {
                        else { m->setListFile(listfile); }
                        
                        taxfile = validParameter.validFile(parameters, "taxonomy", true);
-                       if (taxfile == "not open") { abort = true; }
+                       if (taxfile == "not open") { taxfile = ""; abort = true; }
                        else if (taxfile == "not found") {  taxfile = "";  }
                        else { m->setTaxonomyFile(taxfile); }
                        
@@ -249,6 +249,11 @@ GetSeqsCommand::GetSeqsCommand(string option)  {
                        dups = m->isTrue(temp);
                        
                        if ((fastafile == "") && (namefile == "") && (groupfile == "") && (alignfile == "") && (listfile == "") && (taxfile == "") && (qualfile == "") && (accnosfile2 == ""))  { m->mothurOut("You must provide one of the following: fasta, name, group, alignreport, taxonomy, quality or listfile."); m->mothurOutEndLine(); abort = true; }
+               
+                       if ((namefile == "") && ((fastafile != "") || (taxfile != ""))){
+                               vector<string> files; files.push_back(fastafile); files.push_back(taxfile);
+                               parser.getNameFile(files);
+                       }
                }
 
        }