]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedcommand.cpp
added boneh, efron, and solow calculators
[mothur.git] / sharedcommand.cpp
index 6c4c8ac9afbda821c545ab3a48d60a993e290620..c29d5499808e13bd9246098f50706337b3f9e592 100644 (file)
@@ -38,17 +38,22 @@ int SharedCommand::execute(){
                globaldata = GlobalData::getInstance();
                        
                //read in listfile
-               read = new ReadPhilFile(globaldata->inputFileName);     
+               read = new ReadOTUFile(globaldata->inputFileName);      
                read->read(&*globaldata); 
                input = globaldata->ginput;
-               list = globaldata->glist;
+               SharedList = globaldata->gSharedList;
                
                shared = new Shared();
                int i = 0;
-               while(list != NULL){
-                       shared->getSharedVectors(i, list); //fills sharedGroups with new info and updates sharedVector
-                       list = input->getListVector(); //get new list vector to process
-                       printSharedData(); //prints info to the .shared file
+               while(SharedList != NULL){
+               
+                       if(globaldata->allLines == 1 || globaldata->lines.count(i+1) == 1 || globaldata->labels.count(SharedList->getLabel()) == 1){
+                       
+                               shared->getSharedVectors(i, SharedList); //fills sharedGroups with new info and updates sharedVector
+                               printSharedData(); //prints info to the .shared file
+                       }
+                       
+                       SharedList = input->getSharedListVector(); //get new list vector to process
                        i++;
                }
                return 0;