]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedcommand.cpp
added command descriptions
[mothur.git] / sharedcommand.cpp
index cb4b4e6ced702b08d2b1dda3668f376a82e1e624..38bc480836ba114e3ed55d0c1aa65f4e33d4218a 100644 (file)
@@ -73,6 +73,7 @@ SharedCommand::SharedCommand(string option)  {
                
                //allow user to run help
                if(option == "help") { help(); abort = true; calledHelp = true; }
+               else if(option == "citation") { citation(); abort = true; calledHelp = true;}
                
                else {
                        
@@ -130,7 +131,7 @@ SharedCommand::SharedCommand(string option)  {
                                 listfile = m->getListFile(); 
                                 if (listfile != "") { m->mothurOut("Using " + listfile + " as input file for the list parameter."); m->mothurOutEndLine(); }
                                 else {         m->mothurOut("You have no current list file and the list parameter is required."); m->mothurOutEndLine(); abort = true; }
-                        }      
+                        }else { m->setListFile(listfile); }    
                                                        
                         ordergroupfile = validParameter.validFile(parameters, "ordergroup", true);
                         if (ordergroupfile == "not open") { abort = true; }    
@@ -318,6 +319,7 @@ int SharedCommand::execute(){
                                                return 0; 
                                        }
                                        
+                                       if (!m->printedHeaders) { lookup[0]->printHeaders(out); }
                                        printSharedData(lookup); //prints info to the .shared file
                                        for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  }
                                
@@ -347,6 +349,7 @@ int SharedCommand::execute(){
                                                return 0; 
                                        }
                                        
+                                       if (!m->printedHeaders) { lookup[0]->printHeaders(out); }
                                        printSharedData(lookup); //prints info to the .shared file
                                        for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  }
                                        
@@ -392,6 +395,7 @@ int SharedCommand::execute(){
                                        return 0; 
                        }
                        
+                       if (!m->printedHeaders) { lookup[0]->printHeaders(out); }
                        printSharedData(lookup); //prints info to the .shared file
                        for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  }
                        delete SharedList;