- //read in query sequences and subject sequences
- mothurOut("Reading sequences and template file... "); cout.flush();
- querySeqs = readSeqs(fastafile);
- templateSeqs = readSeqs(templateFile);
- mothurOut("Done."); mothurOutEndLine();
-
- int numSeqs = querySeqs.size();
-
- obsDistance.resize(numSeqs);
- expectedDistance.resize(numSeqs);
- seqCoef.resize(numSeqs);
- DE.resize(numSeqs);
- Qav.resize(numSeqs);
- bestfit.resize(numSeqs);
- trim.resize(numSeqs);
- deviation.resize(numSeqs);
- windowSizes.resize(numSeqs, window);
-
- //break up file if needed
- int linesPerProcess = processors / numSeqs;
-
- #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
- //find breakup of sequences for all times we will Parallelize
- if (processors == 1) { lines.push_back(new linePair(0, numSeqs)); }
- else {
- //fill line pairs
- for (int i = 0; i < (processors-1); i++) {
- lines.push_back(new linePair((i*linesPerProcess), ((i*linesPerProcess) + linesPerProcess)));
+ mergedFilterString = "";
+ windowSizesTemplate.resize(templateSeqs.size(), window);
+ quantiles.resize(100); //one for every percent mismatch
+ quantilesMembers.resize(100); //one for every percent mismatch
+
+ //if the user does not enter a mask then you want to keep all the spots in the alignment
+ if (seqMask.length() == 0) { decalc->setAlignmentLength(templateSeqs[0]->getAligned().length()); }
+ else { decalc->setAlignmentLength(seqMask.length()); }
+
+ decalc->setMask(seqMask);
+
+ #ifdef USE_MPI
+ //do nothing
+ #else
+ #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
+ //find breakup of templatefile for quantiles
+ if (processors == 1) { templateLines.push_back(new linePair(0, templateSeqs.size())); }
+ else {
+ for (int i = 0; i < processors; i++) {
+ templateLines.push_back(new linePair());
+ templateLines[i]->start = int (sqrt(float(i)/float(processors)) * templateSeqs.size());
+ templateLines[i]->end = int (sqrt(float(i+1)/float(processors)) * templateSeqs.size());