X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=libshuffcommand.cpp;h=11430117dd1df9c9e2696010324eb3c51b4f2fe6;hb=f06fdb807822f8e06db003ed809c87250905cfc8;hp=02104142c753b626f245f256e910c4ed3351e6bb;hpb=ec1b5bc7460ac8ad40f54f0729900d9ed98e7292;p=mothur.git diff --git a/libshuffcommand.cpp b/libshuffcommand.cpp index 0210414..1143011 100644 --- a/libshuffcommand.cpp +++ b/libshuffcommand.cpp @@ -243,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