]> git.donarmstrong.com Git - mothur.git/blobdiff - clusterfragmentscommand.cpp
added set.current and get.current commands and modified existing commands to update...
[mothur.git] / clusterfragmentscommand.cpp
index a8277ffb029fdd6e5f3e110614836e37292ce9a3..be78e76d75e15ace53867afb13bece32969c76ad 100644 (file)
@@ -258,6 +258,18 @@ int ClusterFragmentsCommand::execute(){
                m->mothurOut(newNamesFile); m->mothurOutEndLine();      
                outputNames.push_back(newFastaFile);  outputNames.push_back(newNamesFile); outputTypes["fasta"].push_back(newFastaFile); outputTypes["name"].push_back(newNamesFile);
                m->mothurOutEndLine();
+               
+               //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("name");
+               if (itTypes != outputTypes.end()) {
+                       if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setNameFile(current); }
+               }
 
                return 0;