/**************************************************************************************************/
GlobalData* GlobalData::_uniqueInstance = 0;
+CommandFactory* CommandFactory::_uniqueInstance = 0;
int main(int argc, char *argv[]){
try {
- //remove old logfile
- string logFileName = "mothur.logFile";
- remove(logFileName.c_str());
+ string log = "mothur.logFile";
+ remove(log.c_str());
+
+ time_t ltime = time(NULL); /* calendar time */
+ string logFileName = "mothur." + toString(ltime) + ".logfile";
//version
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
//header
- mothurOut("mothur v.1.6.0");
+ mothurOut("mothur v.1.8");
mothurOutEndLine();
- mothurOut("Last updated: 9/15/2009");
+ mothurOut("Last updated: 2/02/2010");
mothurOutEndLine();
mothurOutEndLine();
mothurOut("by");
mothurOut("pschloss@umich.edu");
mothurOutEndLine();
mothurOut("http://www.mothur.org");
- mothurOutEndLine();
+ mothurOutEndLine();
+ mothurOutEndLine();
+ mothurOut("When using, please cite:");
+ mothurOutEndLine();
+ mothurOut("Schloss, P.D., et al., Introducing mothur: Open-source, platform-independent, community-supported software for describing and comparing microbial communities. Appl Environ Microbiol, 2009. 75(23):7537-41.");
mothurOutEndLine();
mothurOutEndLine();
mothurOut("Distributed under the GNU General Public License");
//srand(54321);
srand( (unsigned)time( NULL ) );
-
+
Engine* mothur;
bool bail = 0;
string input;
}
}
else{
- mothur = new InteractEngine(argv[0]);
+ mothur = new InteractEngine(argv[0]);
}
-
+
while(bail == 0) { bail = mothur->getInput(); }
+
+ string outputDir = mothur->getOutputDir();
+ logFileName = outputDir + logFileName;
+ //need this because mothur.h makes the logfile, but doesn't know where to put it
+ rename(log.c_str(), logFileName.c_str()); //logfile with timestamp
+
delete mothur;
-
+
return 0;
}
catch(exception& e) {