]> git.donarmstrong.com Git - mothur.git/blobdiff - readmatrix.cpp
Added get.line command.
[mothur.git] / readmatrix.cpp
index bd92f6c40ef1638ece9fe6319651fff48be83fa3..72dd799ec6d2e419dd843db6288de313fa0b4078 100644 (file)
@@ -346,19 +346,19 @@ void ReadPhilFile::read(GlobalData* globaldata){
                        //you have two inputs because in the next if statement if you only have one then it moves ahead in the same file.  
                        //So when you run the collect or summary commands you miss a line.
                        input = new InputData(philFile, globaldata->getFormat()); //format tells you whether philFile is list, rabund, sabund.
-                       inputSabund = new InputData(philFile, globaldata->getFormat()); //format tells you whether philFile is list, rabund, sabund.
+                       inputSabund = new InputData(philFile, globaldata->getFormat()); //format tells you whether philFile is list, rabund, sabund or shared.
                }else {//there is an orderfile
                        input = new InputData(philFile, globaldata->getOrderFile(), globaldata->getFormat());
                }
                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 {
-                       SharedList = input->getSharedListVector(); //you are reading for parselist command, or shared commands.
+               }else if (globaldata->getFormat() == "shared") {
+                       SharedList = input->getSharedListVector(); //you are reading for collect.shared, rarefaction.shared, summary.shared, parselist command, or shared commands.
                        globaldata->gSharedList = SharedList;
                }
        }