]> git.donarmstrong.com Git - mothur.git/blobdiff - splitgroupscommand.cpp
added cutoff change to hcluster
[mothur.git] / splitgroupscommand.cpp
index c21243431875e4940cc9e75256eb5e3829584792..6dd6206084fbe7ea81b9ad254ac2aedf28031407 100644 (file)
@@ -70,6 +70,7 @@ SplitGroupCommand::SplitGroupCommand(string option)  {
                        
                //allow user to run help
                if(option == "help") { help(); abort = true; calledHelp = true; }
+               else if(option == "citation") { citation(); abort = true; calledHelp = true;}
                
                else {
                        vector<string> myArray = setParameters();
@@ -125,6 +126,7 @@ SplitGroupCommand::SplitGroupCommand(string option)  {
                        namefile = validParameter.validFile(parameters, "name", true);
                        if (namefile == "not open") { abort = true; }
                        else if (namefile == "not found") { namefile = ""; }    
+                       else { m->setNameFile(namefile); }
                
                        fastafile = validParameter.validFile(parameters, "fasta", true);
                        if (fastafile == "not open") { abort = true; }
@@ -132,7 +134,7 @@ SplitGroupCommand::SplitGroupCommand(string option)  {
                                fastafile = m->getFastaFile(); 
                                if (fastafile != "") { m->mothurOut("Using " + fastafile + " as input file for the fasta parameter."); m->mothurOutEndLine(); }
                                else {  m->mothurOut("You have no current fastafile and the fasta parameter is required."); m->mothurOutEndLine(); abort = true; }
-                       }       
+                       }else { m->setFastaFile(fastafile); }   
                        
                        groupfile = validParameter.validFile(parameters, "group", true);
                        if (groupfile == "not open") {  groupfile = ""; abort = true; } 
@@ -140,7 +142,7 @@ SplitGroupCommand::SplitGroupCommand(string option)  {
                                groupfile = m->getGroupFile(); 
                                if (groupfile != "") { m->mothurOut("Using " + groupfile + " as input file for the group parameter."); m->mothurOutEndLine(); }
                                else {  m->mothurOut("You have no current groupfile and the group parameter is required."); m->mothurOutEndLine(); abort = true; }
-                       }
+                       }else {  m->setGroupFile(groupfile); }
                        
                        groups = validParameter.validFile(parameters, "groups", false);         
                        if (groups == "not found") { groups = ""; }