]> git.donarmstrong.com Git - mothur.git/blobdiff - preclustercommand.cpp
added set.current and get.current commands and modified existing commands to update...
[mothur.git] / preclustercommand.cpp
index 14409f5a0a6aa86a166f42ff6f99423777237759..0fb9370d191440562b9e6f6e7727ed00366b160b 100644 (file)
@@ -245,7 +245,19 @@ int PreClusterCommand::execute(){
                m->mothurOut(newFastaFile); m->mothurOutEndLine();      outputNames.push_back(newFastaFile); outputTypes["fasta"].push_back(newFastaFile);
                m->mothurOut(newNamesFile); m->mothurOutEndLine();      outputNames.push_back(newNamesFile); 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;
                
        }