]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.cpp
modified read.otu and shared command
[mothur.git] / mothur.cpp
index 59837dd72d7dc8dbe76ee3125052461a9e7b580a..88caa25fd2a16375e6ad515e989cdf19ddcfc916 100644 (file)
@@ -17,6 +17,56 @@ GlobalData* GlobalData::_uniqueInstance = 0;
 
 int main(int argc, char *argv[]){
        try {
+               
+               //remove old logfile
+               string logFileName = "mothur.logFile";
+               remove(logFileName.c_str());
+               
+               //version
+               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+                       #if defined (__APPLE__) || (__MACH__)
+                               mothurOutJustToLog("Mac version");
+                               mothurOutEndLine(); mothurOutEndLine();
+                       #else
+                               mothurOutJustToLog("Linux version");
+                               mothurOutEndLine(); mothurOutEndLine();
+                       #endif
+
+               #else
+                       mothurOutJustToLog("Windows version");
+                       mothurOutEndLine(); mothurOutEndLine();
+               #endif          
+
+               
+               //header
+               mothurOut("mothur v.1.4.1");
+               mothurOutEndLine();             
+               mothurOut("Last updated: 6/23/2009");
+               mothurOutEndLine();     
+               mothurOutEndLine();             
+               mothurOut("by");
+               mothurOutEndLine();             
+               mothurOut("Patrick D. Schloss");
+               mothurOutEndLine();
+               mothurOutEndLine();                     
+               mothurOut("Department of Microbiology");
+               mothurOutEndLine();             
+               mothurOut("pschloss@micro.umass.edu");
+               mothurOutEndLine();             
+               mothurOut("http://schloss.micro.umass.edu/mothur");
+               mothurOutEndLine();     
+               mothurOutEndLine();     
+               mothurOutEndLine();             
+               mothurOut("Distributed under the GNU General Public License");
+               mothurOutEndLine();
+               mothurOutEndLine();                     
+               mothurOut("Type 'help()' for information on the commands that are available");
+               mothurOutEndLine();
+               mothurOutEndLine();                     
+               mothurOut("Type 'quit()' to exit program");
+               mothurOutEndLine();     
+
+                               
                //srand(54321);
                srand( (unsigned)time( NULL ) );
 
@@ -44,11 +94,7 @@ int main(int argc, char *argv[]){
                return 0;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the dotur class Function main. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }
-       catch(...) {
-               cout << "An unknown error has occurred in the dotur class function main. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               errorOut(e, "mothur", "main");
                exit(1);
        }
 }