]> git.donarmstrong.com Git - mothur.git/blobdiff - splitgroupscommand.cpp
added cutoff change to hcluster
[mothur.git] / splitgroupscommand.cpp
index bdb6e7c0151b10cb96fc6d0aa59d66199dba2e6f..6dd6206084fbe7ea81b9ad254ac2aedf28031407 100644 (file)
@@ -41,7 +41,7 @@ string SplitGroupCommand::getHelpString(){
                helpString += "If you want .fasta and .names files for all groups, set groups=all.  \n";
                helpString += "The split.group command should be used in the following format: split.group(fasta=yourFasta, group=yourGroupFile).\n";
                helpString += "Example: split.group(fasta=abrecovery.fasta, group=abrecovery.groups).\n";
-               helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n\n";
+               helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
                return helpString;
        }
        catch(exception& e) {
@@ -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 = ""; }