]> git.donarmstrong.com Git - mothur.git/blobdiff - trimseqscommand.cpp
added set.current and get.current commands and modified existing commands to update...
[mothur.git] / trimseqscommand.cpp
index 49aca824ea46fb18c5845e4caa5bab0aca5db305..0e0ed587343e1a02288f7a49b9af18c8dcf846c5 100644 (file)
@@ -405,7 +405,7 @@ int TrimSeqsCommand::execute(){
 
                //output group counts
                m->mothurOutEndLine();
-               int total = 0;
+               //int total = 0;
 //             for (int i = 0; i < barcodeNameVector.size(); i++) {
 //                     if ((barcodeNameVector[i] != "") && (groupCounts[i] != 0)) { total += groupCounts[i]; m->mothurOut("Group " + barcodeNameVector[i] + " contains " + toString(groupCounts[i]) + " sequences."); m->mothurOutEndLine(); }
 //             }
@@ -413,6 +413,23 @@ int TrimSeqsCommand::execute(){
                
                        if (m->control_pressed) {       for (int i = 0; i < outputNames.size(); i++) {  remove(outputNames[i].c_str()); } return 0;     }
 
+               //set fasta file as new current fastafile
+               string current = "";
+               itTypes = outputTypes.find("fasta");
+               if (itTypes != outputTypes.end()) {
+                       if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setFastaFile(current); }
+               }
+               
+               itTypes = outputTypes.find("qfile");
+               if (itTypes != outputTypes.end()) {
+                       if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setQualFile(current); }
+               }
+               
+               itTypes = outputTypes.find("group");
+               if (itTypes != outputTypes.end()) {
+                       if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setGroupFile(current); }
+               }
+
                m->mothurOutEndLine();
                m->mothurOut("Output File Names: "); m->mothurOutEndLine();
                for (int i = 0; i < outputNames.size(); i++) {  m->mothurOut(outputNames[i]); m->mothurOutEndLine();    }