]> git.donarmstrong.com Git - mothur.git/blobdiff - libshuffcommand.cpp
paralellized seq.error and dist.shared added some error checks to libshuff and dist...
[mothur.git] / libshuffcommand.cpp
index c827b524649fefe49545aa8769401d781ff016c1..11430117dd1df9c9e2696010324eb3c51b4f2fe6 100644 (file)
@@ -86,6 +86,7 @@ LibShuffCommand::LibShuffCommand(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();
@@ -242,7 +243,11 @@ int LibShuffCommand::execute(){
                
                        
                setGroups();                                                            //set the groups to be analyzed and sorts them
-                       
+               
+               if (numGroups < 2) { m->mothurOut("[ERROR]: libshuff requires at least 2 groups, you only have " + toString(numGroups) + ", aborting."); m->mothurOutEndLine(); m->control_pressed = true; }
+               
+               if (m->control_pressed) { delete groupMap; delete matrix; return 0; }
+               
                /********************************************************************************************/
                //this is needed because when we read the matrix we sort it into groups in alphabetical order
                //the rest of the command and the classes used in this command assume specific order