#ifdef USE_MPI
m->mothurOut("When using MPI, the processors parameter is set to the number of MPI processes running. \n");
#endif
- m->mothurOut("The window parameter allows you to specify the window size for searching for chimeras, default=1/4 sequence length. \n");
+ m->mothurOut("The window parameter allows you to specify the window size for searching for chimeras, default=300. \n");
m->mothurOut("The increment parameter allows you to specify how far you move each window while finding chimeric sequences, default=25.\n");
m->mothurOut("The conservation parameter allows you to enter a frequency file containing the highest bases frequency at each place in the alignment.\n");
m->mothurOut("The quantile parameter allows you to enter a file containing quantiles for a template files sequences, if you use the filter the quantile file generated becomes unique to the fasta file you used.\n");
int start = time(NULL);
- chimera = new Pintail(fastafile, templatefile, filter, processors, maskfile, consfile, quanfile, window, increment, outputDir);
-
//set user options
if (maskfile == "default") { m->mothurOut("I am using the default 236627 EU009184.1 Shigella dysenteriae str. FBD013."); m->mothurOutEndLine(); }
-
+ chimera = new Pintail(fastafile, templatefile, filter, processors, maskfile, consfile, quanfile, window, increment, outputDir);
+
string outputFileName, accnosFileName;
if (maskfile != "") {
outputFileName = outputDir + getRootName(getSimpleName(fastafile)) + maskfile + ".pintail.chimeras";
int outMode=MPI_MODE_CREATE|MPI_MODE_WRONLY;
int inMode=MPI_MODE_RDONLY;
-
- char outFilename[outputFileName.length()];
+
+ //char* outFilename = new char[outputFileName.length()];
+ //memcpy(outFilename, outputFileName.c_str(), outputFileName.length());
+
+ char outFilename[1024];
strcpy(outFilename, outputFileName.c_str());
- char outAccnosFilename[accnosFileName.length()];
+ //char* outAccnosFilename = new char[accnosFileName.length()];
+ //memcpy(outAccnosFilename, accnosFileName.c_str(), accnosFileName.length());
+
+ char outAccnosFilename[1024];
strcpy(outAccnosFilename, accnosFileName.c_str());
+
+ //char* inFileName = new char[fastafile.length()];
+ //memcpy(inFileName, fastafile.c_str(), fastafile.length());
- char inFileName[fastafile.length()];
+ char inFileName[1024];
strcpy(inFileName, fastafile.c_str());
MPI_File_open(MPI_COMM_WORLD, inFileName, inMode, MPI_INFO_NULL, &inMPI); //comm, filename, mode, info, filepointer
MPI_File_open(MPI_COMM_WORLD, outFilename, outMode, MPI_INFO_NULL, &outMPI);
MPI_File_open(MPI_COMM_WORLD, outAccnosFilename, outMode, MPI_INFO_NULL, &outMPIAccnos);
+ //delete inFileName;
+ //delete outFilename;
+ //delete outAccnosFilename;
+
if (m->control_pressed) { MPI_File_close(&inMPI); MPI_File_close(&outMPI); MPI_File_close(&outMPIAccnos); delete chimera; return 0; }
if (pid == 0) { //you are the root process
//read next sequence
int length = MPIPos[start+i+1] - MPIPos[start+i];
- char buf4[length];
+ char* buf4 = new char[length];
MPI_File_read_at(inMPI, MPIPos[start+i], buf4, length, MPI_CHAR, &status);
string tempBuf = buf4;
if (tempBuf.length() > length) { tempBuf = tempBuf.substr(0, length); }
istringstream iss (tempBuf,istringstream::in);
+ delete buf4;
Sequence* candidateSeq = new Sequence(iss); gobble(iss);