-/*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]); }
-
-
-}*/
+ mothurOut("Done."); mothurOutEndLine();
+ }else { createProcessesPairs(); }
+
+//string o = "closestmatch.eachgap.fasta";
+//ofstream out7;
+//openOutputFile(o, out7);
+
+//for (int i = 0; i < bestfit.size(); i++) {
+ //out7 << ">" << querySeqs[i]->getName() << "-"<< bestfit[i]->getName() << endl;
+ //out7 << bestfit[i]->getAligned() << endl;
+//}
+//out7.close();
+ //find P
+ mothurOut("Getting conservation... "); cout.flush();
+ if (consfile == "") {
+ 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, templateFile);
+ mothurOut("Done."); mothurOutEndLine();
+ }else { probabilityProfile = readFreq(); }
+
+ //make P into Q
+ for (int i = 0; i < probabilityProfile.size(); i++) { probabilityProfile[i] = 1 - probabilityProfile[i]; } //cout << i << '\t' << probabilityProfile[i] << endl;
+ mothurOut("Done."); mothurOutEndLine();
+
+ //mask sequences if the user wants to
+ if (seqMask != "") {
+ //mask querys
+ for (int i = 0; i < querySeqs.size(); i++) {
+ decalc->runMask(querySeqs[i]);
+ }
+
+ //mask templates
+ for (int i = 0; i < templateSeqs.size(); i++) {
+ decalc->runMask(templateSeqs[i]);
+ }