- distcalculator = new ignoreGaps();
-
-
- if (processors == 1) {
- mothurOut("Finding closest sequence in template to each sequence... "); cout.flush();
- bestfit = findPairs(lines[0]->start, lines[0]->end);
-/*for (int m = 0; m < templateSeqs.size(); m++) {
- if (templateSeqs[m]->getName() == "159481") { bestfit[17] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "100137") { bestfit[16] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "112956") { bestfit[15] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "102326") { bestfit[14] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "66229") { bestfit[13] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "206276") { bestfit[12] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "63607") { bestfit[11] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "7056") { bestfit[10] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "7088") { bestfit[9] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "17553") { bestfit[8] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "131723") { bestfit[7] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "69013") { bestfit[6] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "24543") { bestfit[5] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "27824") { bestfit[4] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "1456") { bestfit[3] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "1456") { bestfit[2] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "141312") { bestfit[1] = *(templateSeqs[m]); }
- if (templateSeqs[m]->getName() == "141312") { bestfit[0] = *(templateSeqs[m]); }
-
-
-}*/
-
- for (int j = 0; j < bestfit.size(); j++) {
- //chops off beginning and end of sequences so they both start and end with a base
- trimSeqs(querySeqs[j], bestfit[j], j);
- }
- mothurOut("Done."); mothurOutEndLine();
-
- for (int i = lines[0]->start; i < lines[0]->end; i++) {
- it = trimmed[i].begin();
- vector<int> win = findWindows(querySeqs[i], it->first, it->second, windowSizes[i]);
- windows[i] = win;
- }
-
-
- } else { createProcessesSpots(); }
-
- //find P
- if (consfile == "") { probabilityProfile = calcFreq(templateSeqs); }
- else { probabilityProfile = readFreq(); }
+ m->mothurOut("Getting conservation... "); cout.flush();
+ if (consfile == "") {
+ m->mothurOut("Calculating probability of conservation for your template sequences. This can take a while... I will output the frequency of the highest base in each position to a .freq file so that you can input them using the conservation parameter next time you run this command. Providing the .freq file will improve speed. "); cout.flush();
+ probabilityProfile = decalc->calcFreq(templateSeqs, templateFileName);
+ if (m->control_pressed) { return 0; }
+ m->mothurOut("Done."); m->mothurOutEndLine();
+ }else { probabilityProfile = readFreq(); m->mothurOut("Done."); }
+ m->mothurOutEndLine();