X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=errorchecking.cpp;h=8a56c15c9d977de80c230922405c97589251324a;hb=67b6343929b6dbed97c4b26c3bb849725d573f6d;hp=903c58137c1de81036dd43adf6cc3619a861a3c6;hpb=d5c8caf2d08b7ac6de30e33b1d19cfd246d08f03;p=mothur.git diff --git a/errorchecking.cpp b/errorchecking.cpp index 903c581..8a56c15 100644 --- a/errorchecking.cpp +++ b/errorchecking.cpp @@ -26,6 +26,7 @@ ErrorCheck::ErrorCheck() { namefile = globaldata->getNameFile(); groupfile = globaldata->getGroupFile(); orderfile = globaldata->getOrderFile(); + fastafile = globaldata->getFastaFile(); cutoff = globaldata->getCutOff(); format = globaldata->getFormat(); method = globaldata->getMethod(); @@ -77,6 +78,7 @@ bool ErrorCheck::checkInput(string input) { if (parameter == "sabundfile" ) { sabundfile = value; } if (parameter == "namefile" ) { namefile = value; } if (parameter == "orderfile" ) { orderfile = value; } + if (parameter == "fastafile" ) { fastafile = value; } if (parameter == "groupfile" ) { groupfile = value; } if (parameter == "cutoff" ) { cutoff = value; } if (parameter == "precision" ) { precision = value; } @@ -145,6 +147,7 @@ bool ErrorCheck::checkInput(string input) { if (parameter == "namefile" ) { namefile = value; } if (parameter == "orderfile" ) { orderfile = value; } if (parameter == "groupfile" ) { groupfile = value; } + if (parameter == "fastafile" ) { fastafile = value; } if (parameter == "cutoff" ) { cutoff = value; } if (parameter == "precision" ) { precision = value; } if (parameter == "iters" ) { iters = value; } @@ -211,6 +214,8 @@ bool ErrorCheck::checkInput(string input) { validateReadPhil(); }else if (commandName == "read.list") { validateParseFiles(); //checks the listfile and groupfile parameters + }else if (commandName == "deconvolute") { + validateReadFiles(); } //are you trying to cluster before you have read something @@ -285,6 +290,12 @@ void ErrorCheck::validateReadFiles() { //unable to open if (ableToOpen == 1) { errorFree = false; } else { globaldata->inputFileName = sabundfile; } + }else if (fastafile != "") { + ableToOpen = openInputFile(fastafile, filehandle); + filehandle.close(); + //unable to open + if (ableToOpen == 1) { errorFree = false; } + else { globaldata->inputFileName = fastafile; } }else{ //no file given errorFree = false; }