]> git.donarmstrong.com Git - mothur.git/blobdiff - amovacommand.cpp
bug fix to seq.error
[mothur.git] / amovacommand.cpp
index c0b9aec10e4f8695f040e61e80910a8efeb310af..e1a161d0889e313ba018c6cccb8bdc6d9f233083 100644 (file)
@@ -66,8 +66,7 @@ vector<string> AmovaCommand::getValidParameters(){
 //**********************************************************************************************************************
 AmovaCommand::AmovaCommand(){  
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["amova"] = tempOutNames;
        }
@@ -105,12 +104,12 @@ vector<string> AmovaCommand::getRequiredFiles(){
 AmovaCommand::AmovaCommand(string option) {
        try {
                globaldata = GlobalData::getInstance();
-               abort = false;
+               abort = false; calledHelp = false;   
                allLines = 1;
                labels.clear();
                
                //allow user to run help
-               if(option == "help") { help(); abort = true; }
+               if(option == "help") { help(); abort = true; calledHelp = true; }
                
                else {
                        //valid paramters for this command
@@ -319,6 +318,7 @@ AmovaCommand::AmovaCommand(string option) {
 
 void AmovaCommand::help(){
        try {
+               m->mothurOut("Referenced: Anderson MJ (2001). A new method for non-parametric multivariate analysis of variance. Austral Ecol 26: 32-46.\n");
                m->mothurOut("The amova command can only be executed after a successful read.otu command of a list and group or shared file, or by providing a phylip formatted distance matrix.\n");
                m->mothurOut("The amova command outputs a .amova file. \n");
                m->mothurOut("The amova command parameters are phylip, iters, groups, label, design, sets and processors.  The design parameter is required.\n");
@@ -349,7 +349,7 @@ AmovaCommand::~AmovaCommand(){}
 int AmovaCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                //read design file
                designMap = new GroupMap(designfile);