]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedcommand.cpp
changed defaults for filter.seqs()
[mothur.git] / sharedcommand.cpp
index 0cc1e22f2d9067fb7fcad21b6cff5c456f5e7049..c29d5499808e13bd9246098f50706337b3f9e592 100644 (file)
@@ -38,7 +38,7 @@ 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;
                SharedList = globaldata->gSharedList;
@@ -46,9 +46,14 @@ int SharedCommand::execute(){
                shared = new Shared();
                int i = 0;
                while(SharedList != NULL){
-                       shared->getSharedVectors(i, SharedList); //fills sharedGroups with new info and updates sharedVector
+               
+                       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
-                       printSharedData(); //prints info to the .shared file
                        i++;
                }
                return 0;