5 * Created by Sarah Westcott on 7/9/09.
6 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
11 #include "ignoregaps.h"
13 //***************************************************************************************************************
15 Pintail::Pintail(string filename, string temp) { fastafile = filename; templateFile = temp; }
16 //***************************************************************************************************************
20 for (int i = 0; i < querySeqs.size(); i++) { delete querySeqs[i]; }
21 for (int i = 0; i < templateSeqs.size(); i++) { delete templateSeqs[i]; }
23 if (processors != 1) { for (int i = 0; i < bestfit.size(); i++) { delete bestfit[i]; } }
26 errorOut(e, "Pintail", "~Pintail");
30 //***************************************************************************************************************
31 void Pintail::print(ostream& out) {
34 for (int i = 0; i < querySeqs.size(); i++) {
36 int index = ceil(deviation[i]);
38 //is your DE value higher than the 95%
40 if (DE[i] > quantiles[index][4]) { chimera = "Yes"; }
41 else { chimera = "No"; }
43 out << querySeqs[i]->getName() << '\t' << "div: " << deviation[i] << "\tstDev: " << DE[i] << "\tchimera flag: " << chimera << endl;
44 if (chimera == "Yes") {
45 mothurOut(querySeqs[i]->getName() + "\tdiv: " + toString(deviation[i]) + "\tstDev: " + toString(DE[i]) + "\tchimera flag: " + chimera); mothurOutEndLine();
49 for (int j = 0; j < obsDistance[i].size(); j++) { out << obsDistance[i][j] << '\t'; }
54 for (int m = 0; m < expectedDistance[i].size(); m++) { out << expectedDistance[i][m] << '\t'; }
60 errorOut(e, "Pintail", "print");
65 //***************************************************************************************************************
66 void Pintail::getChimeras() {
69 //read in query sequences and subject sequences
70 mothurOut("Reading sequences and template file... "); cout.flush();
71 querySeqs = readSeqs(fastafile);
72 templateSeqs = readSeqs(templateFile);
73 mothurOut("Done."); mothurOutEndLine();
75 int numSeqs = querySeqs.size();
77 obsDistance.resize(numSeqs);
78 expectedDistance.resize(numSeqs);
79 seqCoef.resize(numSeqs);
82 bestfit.resize(numSeqs);
83 deviation.resize(numSeqs);
84 trimmed.resize(numSeqs);
85 windowSizes.resize(numSeqs, window);
86 windowSizesTemplate.resize(templateSeqs.size(), window);
87 windowsForeachQuery.resize(numSeqs);
89 quantiles.resize(100); //one for every percent mismatch
91 //break up file if needed
92 int linesPerProcess = numSeqs / processors ;
94 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
95 //find breakup of sequences for all times we will Parallelize
96 if (processors == 1) { lines.push_back(new linePair(0, numSeqs)); }
99 for (int i = 0; i < (processors-1); i++) {
100 lines.push_back(new linePair((i*linesPerProcess), ((i*linesPerProcess) + linesPerProcess)));
102 //this is necessary to get remainder of processors / numSeqs so you don't miss any lines at the end
103 int i = processors - 1;
104 lines.push_back(new linePair((i*linesPerProcess), numSeqs));
107 //find breakup of templatefile for quantiles
108 if (processors == 1) { templateLines.push_back(new linePair(0, templateSeqs.size())); }
110 for (int i = 0; i < processors; i++) {
111 templateLines.push_back(new linePair());
112 templateLines[i]->start = int (sqrt(float(i)/float(processors)) * templateSeqs.size());
113 templateLines[i]->end = int (sqrt(float(i+1)/float(processors)) * templateSeqs.size());
117 lines.push_back(new linePair(0, numSeqs));
118 templateLines.push_back(new linePair(0, templateSeqs.size()));
121 distcalculator = new ignoreGaps();
122 decalc = new DeCalculator();
124 decalc->setMask(seqMask);
127 if (processors == 1) {
128 mothurOut("Finding closest sequence in template to each sequence... "); cout.flush();
129 bestfit = findPairs(lines[0]->start, lines[0]->end);
130 mothurOut("Done."); mothurOutEndLine();
131 }else { createProcessesPairs(); }
134 for (int j = 0; j < bestfit.size(); j++) {
135 //chops off beginning and end of sequences so they both start and end with a base
137 string s = querySeqs[j]->getName();
139 openOutputFile(s, out);
140 out << ">" << querySeqs[j]->getName() << endl;
141 out << querySeqs[j]->getAligned() << endl;
144 string t =querySeqs[j]->getName() + ".ref";
145 openOutputFile(t, out);
146 out << ">" << bestfit[j]->getName() << endl;
147 out << bestfit[j]->getAligned() << endl;
153 mothurOut("Getting conservation... "); cout.flush();
154 if (consfile == "") {
155 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();
156 probabilityProfile = decalc->calcFreq(templateSeqs, templateFile);
157 mothurOut("Done."); mothurOutEndLine();
158 }else { probabilityProfile = readFreq(); }
161 for (int i = 0; i < probabilityProfile.size(); i++) { probabilityProfile[i] = 1 - probabilityProfile[i]; cout << i << '\t' << probabilityProfile[i] << endl; }
162 mothurOut("Done."); mothurOutEndLine();
165 for (int i = 0; i < querySeqs.size(); i++) {
166 //cout << querySeqs[i]->getName() << " before mask = " << querySeqs[i]->getAligned() << endl << endl;
167 decalc->runMask(querySeqs[i]);
168 //cout << querySeqs[i]->getName() << " after mask = " << querySeqs[i]->getAligned() << endl << endl;
172 for (int i = 0; i < templateSeqs.size(); i++) {
173 decalc->runMask(templateSeqs[i]);
176 //for (int i = 0; i < lines.size(); i++) { cout << "line pair " << i << " = " << lines[i]->start << '\t' << lines[i]->end << endl; }
178 if (processors == 1) {
180 for (int j = 0; j < bestfit.size(); j++) {
181 cout << querySeqs[j]->getName() << " after mask = " << querySeqs[j]->getAligned() << endl << endl;
182 cout << bestfit[j]->getName() << " after mask = " << bestfit[j]->getAligned() << endl << endl;
183 decalc->trimSeqs(querySeqs[j], bestfit[j], trimmed[j]);
186 mothurOut("Finding window breaks... "); cout.flush();
187 for (int i = lines[0]->start; i < lines[0]->end; i++) {
188 it = trimmed[i].begin();
189 cout << i << '\t' << "trimmed = " << it->first << '\t' << it->second << endl;
190 vector<int> win = decalc->findWindows(querySeqs[i], it->first, it->second, windowSizes[i], increment);
191 windowsForeachQuery[i] = win;
193 mothurOut("Done."); mothurOutEndLine();
195 }else { createProcessesSpots(); }
198 if (processors == 1) {
200 mothurOut("Calculating observed distance... "); cout.flush();
201 for (int i = lines[0]->start; i < lines[0]->end; i++) {
202 cout << querySeqs[i]->getName() << '\t' << bestfit[i]->getName() << " windows = " << windowsForeachQuery[i].size() << " size = " << windowSizes[i] << endl;
203 vector<float> obsi = decalc->calcObserved(querySeqs[i], bestfit[i], windowsForeachQuery[i], windowSizes[i]);
205 for (int j = 0; j < obsi.size(); j++) {
206 cout << obsi[j] << '\t';
209 obsDistance[i] = obsi;
211 mothurOut("Done."); mothurOutEndLine();
214 mothurOut("Finding variability... "); cout.flush();
215 for (int i = lines[0]->start; i < lines[0]->end; i++) {
216 vector<float> q = decalc->findQav(windowsForeachQuery[i], windowSizes[i], probabilityProfile);
220 for (int j = 0; j < Qav[i].size(); j++) {
221 cout << Qav[i][j] << '\t';
223 cout << endl << endl;
226 mothurOut("Done."); mothurOutEndLine();
229 mothurOut("Calculating alpha... "); cout.flush();
230 for (int i = lines[0]->start; i < lines[0]->end; i++) {
231 float alpha = decalc->getCoef(obsDistance[i], Qav[i]);
232 cout << i+1 << "\tcoef = " << alpha << endl;
235 mothurOut("Done."); mothurOutEndLine();
238 mothurOut("Calculating expected distance... "); cout.flush();
239 for (int i = lines[0]->start; i < lines[0]->end; i++) {
240 vector<float> exp = decalc->calcExpected(Qav[i], seqCoef[i]);
241 expectedDistance[i] = exp;
243 mothurOut("Done."); mothurOutEndLine();
246 mothurOut("Finding deviation... "); cout.flush();
247 for (int i = lines[0]->start; i < lines[0]->end; i++) {
248 float de = decalc->calcDE(obsDistance[i], expectedDistance[i]);
250 cout << querySeqs[i]->getName() << '\t' << "de value = " << de << endl;
251 it = trimmed[i].begin();
252 float dist = decalc->calcDist(querySeqs[i], bestfit[i], it->first, it->second);
253 cout << querySeqs[i]->getName() << '\t' << "dist value = " << dist << endl;
256 mothurOut("Done."); mothurOutEndLine();
259 else { createProcesses(); }
262 //quantiles are used to determine whether the de values found indicate a chimera
263 //if you have to calculate them, its time intensive because you are finding the de and deviation values for each
264 //combination of sequences in the template
265 if (quanfile != "") { quantiles = readQuantiles(); }
268 mothurOut("Calculating quantiles for your template. This can take a while... I will output the quantiles to a .quan file that you can input them using the quantiles parameter next time you run this command. Providing the .quan file will dramatically improve speed. "); cout.flush();
269 if (processors == 1) {
270 quantiles = decalc->getQuantiles(templateSeqs, windowSizesTemplate, window, probabilityProfile, increment, 0, templateSeqs.size());
271 }else { createProcessesQuan(); }
274 string o = getRootName(templateFile) + "quan";
276 openOutputFile(o, out4);
279 for (int i = 0; i < quantiles.size(); i++) {
280 if (quantiles[i].size() == 0) {
281 //in case this is not a distance found in your template files
282 for (int g = 0; g < 6; g++) {
283 quantiles[i].push_back(0.0);
287 sort(quantiles[i].begin(), quantiles[i].end());
291 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.10)]);
293 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.25)]);
295 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.5)]);
297 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.75)]);
299 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.95)]);
301 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.99)]);
308 for (int u = 0; u < quantiles[i].size(); u++) { out4 << quantiles[i][u] << '\t'; }
313 mothurOut("Done."); mothurOutEndLine();
317 for (int i = 0; i < lines.size(); i++) { delete lines[i]; }
318 for (int i = 0; i < templateLines.size(); i++) { delete templateLines[i]; }
320 delete distcalculator;
323 catch(exception& e) {
324 errorOut(e, "Pintail", "getChimeras");
329 //***************************************************************************************************************
331 vector<float> Pintail::readFreq() {
335 openInputFile(consfile, in);
338 set<int> h = decalc->getPos(); //positions of bases in masking sequence
340 //read in probabilities and store in vector
347 if (h.count(pos-1) > 0) {
349 Pi = (num - 0.25) / 0.75;
351 //cannot have probability less than 0.
352 if (Pi < 0) { Pi = 0.0; }
354 //do you want this spot
365 catch(exception& e) {
366 errorOut(e, "Pintail", "readFreq");
371 //***************************************************************************************************************
373 vector< vector<float> > Pintail::readQuantiles() {
377 openInputFile(quanfile, in);
379 vector< vector<float> > quan;
381 int num; float ten, twentyfive, fifty, seventyfive, ninetyfive, ninetynine;
385 in >> num >> ten >> twentyfive >> fifty >> seventyfive >> ninetyfive >> ninetynine;
390 temp.push_back(twentyfive);
391 temp.push_back(fifty);
392 temp.push_back(seventyfive);
393 temp.push_back(ninetyfive);
394 temp.push_back(ninetynine);
396 quan.push_back(temp);
405 catch(exception& e) {
406 errorOut(e, "Pintail", "readQuantiles");
410 //***************************************************************************************************************
411 //calculate the distances from each query sequence to all sequences in the template to find the closest sequence
412 vector<Sequence*> Pintail::findPairs(int start, int end) {
415 vector<Sequence*> seqsMatches;
417 for(int i = start; i < end; i++){
419 float smallest = 10000.0;
420 Sequence query = *(querySeqs[i]);
423 for(int j = 0; j < templateSeqs.size(); j++){
425 Sequence temp = *(templateSeqs[j]);
427 distcalculator->calcDist(query, temp);
428 float dist = distcalculator->getDist();
430 if (dist < smallest) {
431 match = templateSeqs[j];
436 seqsMatches.push_back(match);
442 catch(exception& e) {
443 errorOut(e, "Pintail", "findPairs");
448 /**************************************************************************************************/
450 void Pintail::createProcessesSpots() {
452 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
454 vector<int> processIDS;
456 //loop through and create all the processes you want
457 while (process != processors) {
461 processIDS.push_back(pid);
465 for (int j = lines[process]->start; j < lines[process]->end; j++) {
467 //chops off beginning and end of sequences so they both start and end with a base
469 decalc->trimSeqs(querySeqs[j], bestfit[j], trim);
474 mothurOut("Finding window breaks for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
475 for (int i = lines[process]->start; i < lines[process]->end; i++) {
476 it = trimmed[i].begin();
477 windowsForeachQuery[i] = decalc->findWindows(querySeqs[i], it->first, it->second, windowSizes[i], increment);
479 mothurOut("Done finding window breaks for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
481 //write out data to file so parent can read it
483 string s = toString(getpid()) + ".temp";
484 openOutputFile(s, out);
486 //output windowsForeachQuery
487 for (int i = lines[process]->start; i < lines[process]->end; i++) {
488 out << windowsForeachQuery[i].size() << '\t';
489 for (int j = 0; j < windowsForeachQuery[i].size(); j++) {
490 out << windowsForeachQuery[i][j] << '\t';
496 for (int i = lines[process]->start; i < lines[process]->end; i++) {
497 out << windowSizes[i] << '\t';
501 //output trimmed values
502 for (int i = lines[process]->start; i < lines[process]->end; i++) {
503 it = trimmed[i].begin();
505 out << it->first << '\t' << it->second << endl;
510 }else { mothurOut("unable to spawn the necessary processes."); mothurOutEndLine(); exit(0); }
513 //force parent to wait until all the processes are done
514 for (int i=0;i<processors;i++) {
515 int temp = processIDS[i];
519 //get data created by processes
520 for (int i=0;i<processors;i++) {
522 string s = toString(processIDS[i]) + ".temp";
523 openInputFile(s, in);
525 int size = lines[i]->end - lines[i]->start;
527 int count = lines[i]->start;
528 for (int m = 0; m < size; m++) {
532 vector<int> win; int w;
533 for (int j = 0; j < num; j++) {
538 windowsForeachQuery[count] = win;
544 count = lines[i]->start;
545 for (int m = 0; m < size; m++) {
549 windowSizes[count] = num;
555 count = lines[i]->start;
556 for (int m = 0; m < size; m++) {
577 for (int j = 0; j < bestfit.size(); j++) {
578 //chops off beginning and end of sequences so they both start and end with a base
579 decalc->trimSeqs(querySeqs[j], bestfit[j], trimmed[j]);
582 for (int i = lines[0]->start; i < lines[0]->end; i++) {
583 it = trimmed[i].begin();
584 map<int, int> win = decalc->findWindows(querySeqs[i], it->first, it->second, windowSizes[i], increment);
590 catch(exception& e) {
591 errorOut(e, "Pintail", "createProcessesSpots");
595 /**************************************************************************************************/
597 void Pintail::createProcessesPairs() {
599 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
601 vector<int> processIDS;
603 //loop through and create all the processes you want
604 while (process != processors) {
608 processIDS.push_back(pid);
612 mothurOut("Finding pairs for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
613 bestfit = findPairs(lines[process]->start, lines[process]->end);
614 mothurOut("Done finding pairs for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
616 //write out data to file so parent can read it
618 string s = toString(getpid()) + ".temp";
619 openOutputFile(s, out);
621 //output range and size
622 out << bestfit.size() << endl;
625 for (int i = 0; i < bestfit.size(); i++) {
626 out << ">" << bestfit[i]->getName() << endl << bestfit[i]->getAligned() << endl;
631 }else { mothurOut("unable to spawn the necessary processes."); mothurOutEndLine(); exit(0); }
634 //force parent to wait until all the processes are done
635 for (int i=0;i<processors;i++) {
636 int temp = processIDS[i];
640 //get data created by processes
641 for (int i=0;i<processors;i++) {
643 string s = toString(processIDS[i]) + ".temp";
644 openInputFile(s, in);
647 in >> size; gobble(in);
650 int count = lines[i]->start;
651 for (int m = 0; m < size; m++) {
652 Sequence* temp = new Sequence(in);
653 bestfit[count] = temp;
665 bestfit = findPairs(lines[0]->start, lines[0]->end);
668 catch(exception& e) {
669 errorOut(e, "Pintail", "createProcessesPairs");
673 /**************************************************************************************************/
675 void Pintail::createProcesses() {
677 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
679 vector<int> processIDS;
681 //loop through and create all the processes you want
682 while (process != processors) {
686 processIDS.push_back(pid);
690 mothurOut("Calculating observed, expected and de values for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
691 for (int i = lines[process]->start; i < lines[process]->end; i++) {
693 vector<float> obsi = decalc->calcObserved(querySeqs[i], bestfit[i], windowsForeachQuery[i], windowSizes[i]);
694 obsDistance[i] = obsi;
697 vector<float> q = decalc->findQav(windowsForeachQuery[i], windowSizes[i], probabilityProfile);
700 float alpha = decalc->getCoef(obsDistance[i], q);
703 vector<float> exp = decalc->calcExpected(q, alpha);
704 expectedDistance[i] = exp;
706 //get de and deviation
707 float dei = decalc->calcDE(obsi, exp);
710 it = trimmed[i].begin();
711 float dist = decalc->calcDist(querySeqs[i], bestfit[i], it->first, it->second);
714 mothurOut("Done calculating observed, expected and de values for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
716 //write out data to file so parent can read it
718 string s = toString(getpid()) + ".temp";
719 openOutputFile(s, out);
721 int size = lines[process]->end - lines[process]->start;
724 //output observed distances
725 for (int i = lines[process]->start; i < lines[process]->end; i++) {
726 out << obsDistance[i].size() << '\t';
727 for (int j = 0; j < obsDistance[i].size(); j++) {
728 out << obsDistance[i][j] << '\t';
734 //output expected distances
735 for (int i = lines[process]->start; i < lines[process]->end; i++) {
736 out << expectedDistance[i].size() << '\t';
737 for (int j = 0; j < expectedDistance[i].size(); j++) {
738 out << expectedDistance[i][j] << '\t';
745 for (int i = lines[process]->start; i < lines[process]->end; i++) {
746 out << DE[i] << '\t';
751 for (int i = lines[process]->start; i < lines[process]->end; i++) {
752 out << deviation[i] << '\t';
759 }else { mothurOut("unable to spawn the necessary processes."); mothurOutEndLine(); exit(0); }
762 //force parent to wait until all the processes are done
763 for (int i=0;i<processors;i++) {
764 int temp = processIDS[i];
768 //get data created by processes
769 for (int i=0;i<processors;i++) {
771 string s = toString(processIDS[i]) + ".temp";
772 openInputFile(s, in);
775 in >> size; gobble(in);
777 //get observed distances
778 int count = lines[i]->start;
779 for (int m = 0; m < size; m++) {
783 vector<float> obs; float w;
784 for (int j = 0; j < num; j++) {
789 obsDistance[count] = obs;
796 //get expected distances
797 count = lines[i]->start;
798 for (int m = 0; m < size; m++) {
802 vector<float> exp; float w;
803 for (int j = 0; j < num; j++) {
808 expectedDistance[count] = exp;
815 count = lines[i]->start;
816 for (int m = 0; m < size; m++) {
826 count = lines[i]->start;
827 for (int m = 0; m < size; m++) {
831 deviation[count] = num;
841 mothurOut("Calculating observed distance... "); cout.flush();
842 for (int i = lines[0]->start; i < lines[0]->end; i++) {
843 vector<float> obsi = decalc->calcObserved(querySeqs[i], bestfit[i], windows[i], windowSizes[i]);
844 obsDistance[i] = obsi;
846 mothurOut("Done."); mothurOutEndLine();
850 mothurOut("Finding variability... "); cout.flush();
851 for (int i = lines[0]->start; i < lines[0]->end; i++) {
852 vector<float> q = decalc->findQav(windows[i], windowSizes[i], probabilityProfile, h[i]);
855 mothurOut("Done."); mothurOutEndLine();
859 mothurOut("Calculating alpha... "); cout.flush();
860 for (int i = lines[0]->start; i < lines[0]->end; i++) {
861 float alpha = decalc->getCoef(obsDistance[i], Qav[i]);
862 seqCoef.push_back(alpha);
864 mothurOut("Done."); mothurOutEndLine();
868 mothurOut("Calculating expected distance... "); cout.flush();
869 for (int i = lines[0]->start; i < lines[0]->end; i++) {
870 vector<float> exp = decalc->calcExpected(Qav[i], seqCoef[i]);
871 expectedDistance[i] = exp;
873 mothurOut("Done."); mothurOutEndLine();
877 mothurOut("Finding deviation... "); cout.flush();
878 for (int i = lines[0]->start; i < lines[0]->end; i++) {
879 float de = decalc->calcDE(obsDistance[i], expectedDistance[i]);
882 it = trimmed[i].begin();
883 float dist = decalc->calcDist(querySeqs[i], bestfit[i], it->first, it->second);
886 mothurOut("Done."); mothurOutEndLine();
890 catch(exception& e) {
891 errorOut(e, "Pintail", "createProcesses");
897 /**************************************************************************************************/
899 void Pintail::createProcessesQuan() {
901 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
903 vector<int> processIDS;
905 //loop through and create all the processes you want
906 while (process != processors) {
910 processIDS.push_back(pid);
914 quantiles = decalc->getQuantiles(templateSeqs, windowSizesTemplate, window, probabilityProfile, increment, templateLines[process]->start, templateLines[process]->end);
916 //write out data to file so parent can read it
918 string s = toString(getpid()) + ".temp";
919 openOutputFile(s, out);
922 //output observed distances
923 for (int i = 0; i < quantiles.size(); i++) {
924 out << quantiles[i].size() << '\t';
925 for (int j = 0; j < quantiles[i].size(); j++) {
926 out << quantiles[i][j] << '\t';
934 }else { mothurOut("unable to spawn the necessary processes."); mothurOutEndLine(); exit(0); }
937 //force parent to wait until all the processes are done
938 for (int i=0;i<processors;i++) {
939 int temp = processIDS[i];
943 //get data created by processes
944 for (int i=0;i<processors;i++) {
946 string s = toString(processIDS[i]) + ".temp";
947 openInputFile(s, in);
949 vector< vector<float> > quan; quan.resize(100);
952 for (int m = 0; m < quan.size(); m++) {
956 vector<float> q; float w;
957 for (int j = 0; j < num; j++) {
967 //save quan in quantiles
968 for (int i = 0; i < quan.size(); i++) {
969 //put all values of q[i] into quan[i]
970 quantiles[i].insert(quantiles[i].begin(), quan[i].begin(), quan[i].end());
978 quantiles = decalc->getQuantiles(templateSeqs, windowSizesTemplate, window, probabilityProfile, increment, 0, templateSeqs.size());
981 catch(exception& e) {
982 errorOut(e, "Pintail", "createProcessesQuan");
988 //***************************************************************************************************************