X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=validparameter.cpp;h=7d1af2551c7a6717c1d3ea807af0e56de0fc218e;hp=7855ddedd11f05b8e8c628e2d5c49c82be646a9b;hb=615301e57c25e241356a9c2380648d117709458d;hpb=10c8178dc5e3f96ef8e92a986f1eddd13e622173 diff --git a/validparameter.cpp b/validparameter.cpp index 7855dde..7d1af25 100644 --- a/validparameter.cpp +++ b/validparameter.cpp @@ -221,6 +221,10 @@ string ValidParameters::validFile(map& container, string paramet if(it != container.end()){ //no parameter given if(isFile == true) { + + int pos = (it->second).find(".tx."); + if (pos != string::npos) { m->sharedHeaderMode = "tax"; } + else { m->sharedHeaderMode = "otu"; } #ifdef USE_MPI int pid, processors; @@ -303,6 +307,14 @@ string ValidParameters::validFile(map& container, string paramet if (!m->isContainingOnlyDigits(numTest)) { m->mothurOut("[ERROR]: expected a number and got " + numTest + ". I suspect you entered a column formatted file as a phylip file, aborting."); m->mothurOutEndLine(); return "not found"; } } + + //check for blank file + if (ableToOpen != 1) { + if (m->isBlank(container[parameter])) { + m->mothurOut("[ERROR]: " + container[parameter] + " is blank, aborting."); m->mothurOutEndLine(); return "not found"; + } + } + } }else { return "not found"; }