X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=errorchecking.cpp;h=067d246d4c50f1427840c3879be04bac2ff7cdf8;hb=b2dca66a02f8f82aa5528e531eace60fbbd2967b;hp=03844d5fa5b132e21ad1ae60e1c9e7b43e343aa2;hpb=d037597badc8d18e235c59f0c1114180edb7f98f;p=mothur.git diff --git a/errorchecking.cpp b/errorchecking.cpp index 03844d5..067d246 100644 --- a/errorchecking.cpp +++ b/errorchecking.cpp @@ -90,7 +90,7 @@ bool ErrorCheck::checkInput(string input) { if (parameter == "name" ) { namefile = value; } if (parameter == "order" ) { orderfile = value; } if (parameter == "fasta" ) { fastafile = value; } - if (parameter == "treefile" ) { treefile = value; } + if (parameter == "tree" ) { treefile = value; } if (parameter == "group" ) { groupfile = value; } if (parameter == "cutoff" ) { cutoff = value; } if (parameter == "precision" ) { precision = value; } @@ -161,7 +161,7 @@ bool ErrorCheck::checkInput(string input) { if (parameter == "order" ) { orderfile = value; } if (parameter == "group" ) { groupfile = value; } if (parameter == "fasta" ) { fastafile = value; } - if (parameter == "treefile" ) { treefile = value; } + if (parameter == "tree" ) { treefile = value; } if (parameter == "cutoff" ) { cutoff = value; } if (parameter == "precision" ) { precision = value; } if (parameter == "iters" ) { iters = value; } @@ -254,6 +254,11 @@ bool ErrorCheck::checkInput(string input) { } } + if ((commandName == "unifrac.weighted") || (commandName == "unifrac.unweighted")) { + if (globaldata->gTree.size() == 0) {//no trees were read + cout << "You must execute the read.tree command, before you may execute the unifrac.weighted or unifrac.unweighted command." << endl; return false; } + } + //check for valid method if (commandName == "cluster") { if ((method == "furthest") || (method == "nearest") || (method == "average")) { }