- int start = time(NULL);
-
- chimera = new Bellerophon(fastafile, filter, correction, window, increment, processors, outputDir);
-
- string outputFileName = outputDir + getRootName(getSimpleName(fastafile)) + "bellerophon.chimeras";
- string accnosFileName = outputDir + getRootName(getSimpleName(fastafile)) + "bellerophon.accnos";
- bool hasAccnos = true;
-
- chimera->getChimeras();
-
- if (m->control_pressed) { delete chimera; return 0; }
-
- #ifdef USE_MPI
- MPI_File outMPI;
- MPI_File outMPIAccnos;
-
- int outMode=MPI_MODE_CREATE|MPI_MODE_WRONLY;
-
- //char* outFilename = new char[accnosFileName.length()];
- //memcpy(outFilename, accnosFileName.c_str(), accnosFileName.length());
-
- char outFilename[1024];
- strcpy(outFilename, accnosFileName.c_str());
-
- //char* FileName = new char[outputFileName.length()];
- //memcpy(FileName, outputFileName.c_str(), outputFileName.length());
-
- char FileName[1024];
- strcpy(FileName, outputFileName.c_str());
-
- MPI_File_open(MPI_COMM_WORLD, FileName, outMode, MPI_INFO_NULL, &outMPI); //comm, filename, mode, info, filepointer
- MPI_File_open(MPI_COMM_WORLD, outFilename, outMode, MPI_INFO_NULL, &outMPIAccnos);
-
- //delete FileName;
- //delete outFilename;
+ for (int i = 0; i < fastaFileNames.size(); i++) {
+
+ m->mothurOut("Checking sequences from " + fastaFileNames[i] + " ..." ); m->mothurOutEndLine();
+
+ int start = time(NULL);
+
+ chimera = new Bellerophon(fastaFileNames[i], filter, correction, window, increment, processors, outputDir);
+
+ string outputFileName = outputDir + getRootName(getSimpleName(fastaFileNames[i])) + "bellerophon.chimeras";
+ string accnosFileName = outputDir + getRootName(getSimpleName(fastaFileNames[i])) + "bellerophon.accnos";
+ bool hasAccnos = true;
+
+ chimera->getChimeras();
+
+ if (m->control_pressed) { delete chimera; for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
+
+ #ifdef USE_MPI
+ MPI_File outMPI;
+ MPI_File outMPIAccnos;
+
+ int outMode=MPI_MODE_CREATE|MPI_MODE_WRONLY;
+
+ char outFilename[1024];
+ strcpy(outFilename, accnosFileName.c_str());