]> git.donarmstrong.com Git - mothur.git/blob - mothur.cpp
started shared utilities, updates to venn and heatmap added tree.groups command
[mothur.git] / mothur.cpp
1 /*
2  *  interface.cpp
3  *  
4  *
5  *  Created by Pat Schloss on 8/14/08.
6  *  Copyright 2008 Patrick D. Schloss. All rights reserved.
7  *
8  */
9  
10 #include "mothur.h"
11 #include "engine.hpp"
12 #include "globaldata.hpp"
13
14 using namespace std;
15
16 /**************************************************************************************************/
17
18 GlobalData* GlobalData::_uniqueInstance = 0;
19
20 int main(int argc, char *argv[]){
21         try {
22                 //srand(54321);
23                 srand( (unsigned)time( NULL ) );
24
25                 Engine* mothur;
26                 bool bail = 0;
27
28                 if(argc>1){
29                         mothur = new BatchEngine(argv[1]);
30                 }
31                 else{
32                         mothur = new InteractEngine();          
33                 }
34
35                 while(bail == 0)                {       bail = mothur->getInput();                      }
36         
37                 delete mothur;
38         
39                 return 0;
40         }
41         catch(exception& e) {
42                 cout << "Standard Error: " << e.what() << " has occurred in the dotur class Function main. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
43                 exit(1);
44         }
45         catch(...) {
46                 cout << "An unknown error has occurred in the dotur class function main. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
47                 exit(1);
48         }
49 }
50
51 /**************************************************************************************************/
52