From: westcott Date: Wed, 28 Jan 2009 14:38:16 +0000 (+0000) Subject: collect.single bug in readphil. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8b6bc106c6dd2ae8c9b59da038f775d524f0e43e;hp=72a92a86c30876883e8af2af9803a3ecf38bdea7;p=mothur.git collect.single bug in readphil. --- diff --git a/errorchecking.cpp b/errorchecking.cpp index 6ec145b..35ea56c 100644 --- a/errorchecking.cpp +++ b/errorchecking.cpp @@ -223,6 +223,7 @@ bool ErrorCheck::checkInput(string input) { }else if (commandName == "read.tree") { validateTreeFiles(); //checks the treefile and groupfile parameters }else if (commandName == "deconvolute") { + if (fastafile == "") { cout << "You must enter a fastafile with the deconvolute() command." << endl; return false; } validateReadFiles(); } @@ -243,9 +244,9 @@ bool ErrorCheck::checkInput(string input) { if ((globaldata->getListFile() == "") && (globaldata->getRabundFile() == "") && (globaldata->getSabundFile() == "")) { cout << "You must read a listfile, sabundfile or rabundfile before you can use the collect.single, rarefaction.single or summary.single commands." << endl; return false; } } - if ((commandName == "collect.shared") || (commandName == "rarefaction.shared") || (commandName == "summary.shared") || (commandName == "shared") ){ - if (globaldata->getListFile() == "") { cout << "You must read a listfile and a groupfile before you can use the collect.shared, rarefaction.shared, summary.shared or shared commands." << endl; return false; } - else if (globaldata->getGroupFile() == "") { cout << "You must read a listfile and a groupfile before you can use the collect.shared, rarefaction.shared, summary.shared or shared commands." << endl; return false; } + if ((commandName == "collect.shared") || (commandName == "rarefaction.shared") || (commandName == "summary.shared") ){ + if (globaldata->getListFile() == "") { cout << "You must read a listfile and a groupfile before you can use the collect.shared, rarefaction.shared or summary.shared commands." << endl; return false; } + else if (globaldata->getGroupFile() == "") { cout << "You must read a listfile and a groupfile before you can use the collect.shared, rarefaction.shared or summary.shared commands." << endl; return false; } } diff --git a/readmatrix.cpp b/readmatrix.cpp index bd92f6c..78a4bd4 100644 --- a/readmatrix.cpp +++ b/readmatrix.cpp @@ -352,12 +352,12 @@ void ReadPhilFile::read(GlobalData* globaldata){ } globaldata->ginput = input; //saving to be used by collector and rarefact commands. - if (globaldata->getGroupFile() == "") {//you are reading a list, rabund or sabund file for collect, rarefaction or summary. + if ((globaldata->getFormat() == "list") || (globaldata->getFormat() == "rabund") || (globaldata->getFormat() == "sabund")) {//you are reading a list, rabund or sabund file for collect, rarefaction or summary. order = input->getOrderVector(); globaldata->gorder = order; //saving to be used by collect and rarefact commands. sabund = inputSabund->getSAbundVector(); globaldata->sabund = sabund; //saving to be used by summary command. - }else { + }else if (globaldata->getFormat() == "shared") { SharedList = input->getSharedListVector(); //you are reading for parselist command, or shared commands. globaldata->gSharedList = SharedList; }