]> git.donarmstrong.com Git - mothur.git/commitdiff
collect.single bug in readphil.
authorwestcott <westcott>
Wed, 28 Jan 2009 14:38:16 +0000 (14:38 +0000)
committerwestcott <westcott>
Wed, 28 Jan 2009 14:38:16 +0000 (14:38 +0000)
errorchecking.cpp
readmatrix.cpp

index 6ec145b7e97341178f3821e0be1dfb6cc7e360c6..35ea56cabca2e1beefdf2d77bde419a4d7220d0a 100644 (file)
@@ -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; }
                }
  
                
index bd92f6c40ef1638ece9fe6319651fff48be83fa3..78a4bd4efe97b355513c51bec77616cbefa6a4e7 100644 (file)
@@ -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;
                }