- distCalculator = new ignoreGaps();
-
- //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();
-
- //if window is set to default
- if (window == 0) { if (querySeqs[0]->getAligned().length() > 800) { setWindow(200); }
- else{ setWindow((querySeqs[0]->getAligned().length() / 4)); } }
- else if (window > (querySeqs[0]->getAligned().length() / 4)) {
- mothurOut("You have selected to large a window size for you sequences. I will choose a smaller window."); mothurOutEndLine();
- setWindow((querySeqs[0]->getAligned().length() / 4));
- }
-
- //calculate number of iters
- iters = (querySeqs[0]->getAligned().length() - window + 1) / increment;
-cout << "length = " << querySeqs[0]->getAligned().length() << " window = " << window << " increment = " << increment << " iters = " << iters << endl;
- int linesPerProcess = processors / numSeqs;
-
- //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());
+ }