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]);
37 float quan = 2.64 * log10(deviation[i]) + 1.46;
38 cout << "dist = " << index << endl;
39 cout << "de = " << DE[i] << endl;
40 cout << "mallard quantile = " << quan << endl;
41 cout << "my quantile = " << quantiles[index][4] << endl;
43 //is your DE value higher than the 95%
45 if (DE[i] > quantiles[index][4]) { chimera = "Yes"; }
46 else { chimera = "No"; }
48 out << querySeqs[i]->getName() << '\t' << "div: " << deviation[i] << "\tstDev: " << DE[i] << "\tchimera flag: " << chimera << endl;
49 if (chimera == "Yes") {
50 mothurOut(querySeqs[i]->getName() + "\tdiv: " + toString(deviation[i]) + "\tstDev: " + toString(DE[i]) + "\tchimera flag: " + chimera); mothurOutEndLine();
54 for (int j = 0; j < obsDistance[i].size(); j++) { out << obsDistance[i][j] << '\t'; }
59 for (int m = 0; m < expectedDistance[i].size(); m++) { out << expectedDistance[i][m] << '\t'; }
65 errorOut(e, "Pintail", "print");
70 //***************************************************************************************************************
71 void Pintail::getChimeras() {
74 //read in query sequences and subject sequences
75 mothurOut("Reading sequences and template file... "); cout.flush();
76 querySeqs = readSeqs(fastafile);
77 templateSeqs = readSeqs(templateFile);
78 mothurOut("Done."); mothurOutEndLine();
80 int numSeqs = querySeqs.size();
82 obsDistance.resize(numSeqs);
83 expectedDistance.resize(numSeqs);
84 seqCoef.resize(numSeqs);
87 bestfit.resize(numSeqs);
88 deviation.resize(numSeqs);
89 trimmed.resize(numSeqs);
90 windowSizes.resize(numSeqs, window);
91 windowSizesTemplate.resize(templateSeqs.size(), window);
92 windowsForeachQuery.resize(numSeqs);
94 quantiles.resize(100); //one for every percent mismatch
96 //break up file if needed
97 int linesPerProcess = numSeqs / processors ;
99 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
100 //find breakup of sequences for all times we will Parallelize
101 if (processors == 1) { lines.push_back(new linePair(0, numSeqs)); }
104 for (int i = 0; i < (processors-1); i++) {
105 lines.push_back(new linePair((i*linesPerProcess), ((i*linesPerProcess) + linesPerProcess)));
107 //this is necessary to get remainder of processors / numSeqs so you don't miss any lines at the end
108 int i = processors - 1;
109 lines.push_back(new linePair((i*linesPerProcess), numSeqs));
112 //find breakup of templatefile for quantiles
113 if (processors == 1) { templateLines.push_back(new linePair(0, templateSeqs.size())); }
115 for (int i = 0; i < processors; i++) {
116 templateLines.push_back(new linePair());
117 templateLines[i]->start = int (sqrt(float(i)/float(processors)) * templateSeqs.size());
118 templateLines[i]->end = int (sqrt(float(i+1)/float(processors)) * templateSeqs.size());
122 lines.push_back(new linePair(0, numSeqs));
123 templateLines.push_back(new linePair(0, templateSeqs.size()));
126 distcalculator = new ignoreGaps();
127 decalc = new DeCalculator();
129 decalc->setMask(seqMask);
132 if (processors == 1) {
133 mothurOut("Finding closest sequence in template to each sequence... "); cout.flush();
134 bestfit = findPairs(lines[0]->start, lines[0]->end);
135 mothurOut("Done."); mothurOutEndLine();
136 }else { createProcessesPairs(); }
139 for (int j = 0; j < bestfit.size(); j++) {
140 //chops off beginning and end of sequences so they both start and end with a base
142 string s = querySeqs[j]->getName();
144 openOutputFile(s, out);
145 out << ">" << querySeqs[j]->getName() << endl;
146 out << querySeqs[j]->getAligned() << endl;
149 string t =querySeqs[j]->getName() + ".ref";
150 openOutputFile(t, out);
151 out << ">" << bestfit[j]->getName() << endl;
152 out << bestfit[j]->getAligned() << endl;
158 mothurOut("Getting conservation... "); cout.flush();
159 if (consfile == "") {
160 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();
161 probabilityProfile = decalc->calcFreq(templateSeqs, templateFile);
162 mothurOut("Done."); mothurOutEndLine();
163 }else { probabilityProfile = readFreq(); }
166 for (int i = 0; i < probabilityProfile.size(); i++) { probabilityProfile[i] = 1 - probabilityProfile[i]; } //cout << i << '\t' << probabilityProfile[i] << endl;
167 mothurOut("Done."); mothurOutEndLine();
170 for (int i = 0; i < querySeqs.size(); i++) {
171 //cout << querySeqs[i]->getName() << " before mask = " << querySeqs[i]->getAligned() << endl << endl;
172 decalc->runMask(querySeqs[i]);
173 //cout << querySeqs[i]->getName() << " after mask = " << querySeqs[i]->getAligned() << endl << endl;
177 for (int i = 0; i < templateSeqs.size(); i++) {
178 decalc->runMask(templateSeqs[i]);
181 //for (int i = 0; i < lines.size(); i++) { cout << "line pair " << i << " = " << lines[i]->start << '\t' << lines[i]->end << endl; }
183 if (processors == 1) {
185 for (int j = 0; j < bestfit.size(); j++) {
186 cout << querySeqs[j]->getName() << " after mask = " << querySeqs[j]->getAligned() << endl << endl;
187 cout << bestfit[j]->getName() << " after mask = " << bestfit[j]->getAligned() << endl << endl;
188 decalc->trimSeqs(querySeqs[j], bestfit[j], trimmed[j]);
191 mothurOut("Finding window breaks... "); cout.flush();
192 for (int i = lines[0]->start; i < lines[0]->end; i++) {
193 it = trimmed[i].begin();
194 cout << i << '\t' << "trimmed = " << it->first << '\t' << it->second << endl;
195 vector<int> win = decalc->findWindows(querySeqs[i], it->first, it->second, windowSizes[i], increment);
196 windowsForeachQuery[i] = win;
198 mothurOut("Done."); mothurOutEndLine();
200 }else { createProcessesSpots(); }
203 if (processors == 1) {
205 mothurOut("Calculating observed distance... "); cout.flush();
206 for (int i = lines[0]->start; i < lines[0]->end; i++) {
207 cout << querySeqs[i]->getName() << '\t' << bestfit[i]->getName() << " windows = " << windowsForeachQuery[i].size() << " size = " << windowSizes[i] << endl;
208 vector<float> obsi = decalc->calcObserved(querySeqs[i], bestfit[i], windowsForeachQuery[i], windowSizes[i]);
210 for (int j = 0; j < obsi.size(); j++) {
211 cout << obsi[j] << '\t';
214 obsDistance[i] = obsi;
216 mothurOut("Done."); mothurOutEndLine();
219 mothurOut("Finding variability... "); cout.flush();
220 for (int i = lines[0]->start; i < lines[0]->end; i++) {
221 vector<float> q = decalc->findQav(windowsForeachQuery[i], windowSizes[i], probabilityProfile);
225 for (int j = 0; j < Qav[i].size(); j++) {
226 cout << Qav[i][j] << '\t';
228 cout << endl << endl;
231 mothurOut("Done."); mothurOutEndLine();
234 mothurOut("Calculating alpha... "); cout.flush();
235 for (int i = lines[0]->start; i < lines[0]->end; i++) {
236 float alpha = decalc->getCoef(obsDistance[i], Qav[i]);
237 cout << i+1 << "\tcoef = " << alpha << endl;
240 mothurOut("Done."); mothurOutEndLine();
243 mothurOut("Calculating expected distance... "); cout.flush();
244 for (int i = lines[0]->start; i < lines[0]->end; i++) {
245 vector<float> exp = decalc->calcExpected(Qav[i], seqCoef[i]);
246 expectedDistance[i] = exp;
248 mothurOut("Done."); mothurOutEndLine();
251 mothurOut("Finding deviation... "); cout.flush();
252 for (int i = lines[0]->start; i < lines[0]->end; i++) {
253 float de = decalc->calcDE(obsDistance[i], expectedDistance[i]);
255 cout << querySeqs[i]->getName() << '\t' << "de value = " << de << endl;
256 it = trimmed[i].begin();
257 float dist = decalc->calcDist(querySeqs[i], bestfit[i], it->first, it->second);
258 cout << querySeqs[i]->getName() << '\t' << "dist value = " << dist << endl;
261 mothurOut("Done."); mothurOutEndLine();
264 else { createProcesses(); }
267 //quantiles are used to determine whether the de values found indicate a chimera
268 //if you have to calculate them, its time intensive because you are finding the de and deviation values for each
269 //combination of sequences in the template
270 if (quanfile != "") { quantiles = readQuantiles(); }
273 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();
274 if (processors == 1) {
275 quantiles = decalc->getQuantiles(templateSeqs, windowSizesTemplate, window, probabilityProfile, increment, 0, templateSeqs.size());
276 }else { createProcessesQuan(); }
279 decalc->removeObviousOutliers(quantiles);
282 string o = getRootName(templateFile) + "quan";
284 openOutputFile(o, out4);
287 for (int i = 0; i < quantiles.size(); i++) {
288 if (quantiles[i].size() == 0) {
289 //in case this is not a distance found in your template files
290 for (int g = 0; g < 6; g++) {
291 quantiles[i].push_back(0.0);
295 sort(quantiles[i].begin(), quantiles[i].end());
299 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.10)]);
301 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.25)]);
303 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.5)]);
305 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.75)]);
307 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.95)]);
309 temp.push_back(quantiles[i][int(quantiles[i].size() * 0.99)]);
316 for (int u = 0; u < quantiles[i].size(); u++) { out4 << quantiles[i][u] << '\t'; }
321 mothurOut("Done."); mothurOutEndLine();
325 for (int i = 0; i < lines.size(); i++) { delete lines[i]; }
326 for (int i = 0; i < templateLines.size(); i++) { delete templateLines[i]; }
328 delete distcalculator;
331 catch(exception& e) {
332 errorOut(e, "Pintail", "getChimeras");
337 //***************************************************************************************************************
339 vector<float> Pintail::readFreq() {
343 openInputFile(consfile, in);
346 set<int> h = decalc->getPos(); //positions of bases in masking sequence
348 //read in probabilities and store in vector
355 if (h.count(pos) > 0) {
357 Pi = (num - 0.25) / 0.75;
359 //cannot have probability less than 0.
360 if (Pi < 0) { Pi = 0.0; }
362 //do you want this spot
373 catch(exception& e) {
374 errorOut(e, "Pintail", "readFreq");
379 //***************************************************************************************************************
381 vector< vector<float> > Pintail::readQuantiles() {
385 openInputFile(quanfile, in);
387 vector< vector<float> > quan;
389 int num; float ten, twentyfive, fifty, seventyfive, ninetyfive, ninetynine;
393 in >> num >> ten >> twentyfive >> fifty >> seventyfive >> ninetyfive >> ninetynine;
398 temp.push_back(twentyfive);
399 temp.push_back(fifty);
400 temp.push_back(seventyfive);
401 temp.push_back(ninetyfive);
402 temp.push_back(ninetynine);
404 quan.push_back(temp);
413 catch(exception& e) {
414 errorOut(e, "Pintail", "readQuantiles");
418 //***************************************************************************************************************
419 //calculate the distances from each query sequence to all sequences in the template to find the closest sequence
420 vector<Sequence*> Pintail::findPairs(int start, int end) {
423 vector<Sequence*> seqsMatches;
425 for(int i = start; i < end; i++){
427 float smallest = 10000.0;
428 Sequence query = *(querySeqs[i]);
431 for(int j = 0; j < templateSeqs.size(); j++){
433 Sequence temp = *(templateSeqs[j]);
435 distcalculator->calcDist(query, temp);
436 float dist = distcalculator->getDist();
438 if (dist < smallest) {
439 match = templateSeqs[j];
444 seqsMatches.push_back(match);
450 catch(exception& e) {
451 errorOut(e, "Pintail", "findPairs");
456 /**************************************************************************************************/
458 void Pintail::createProcessesSpots() {
460 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
462 vector<int> processIDS;
464 //loop through and create all the processes you want
465 while (process != processors) {
469 processIDS.push_back(pid);
473 for (int j = lines[process]->start; j < lines[process]->end; j++) {
475 //chops off beginning and end of sequences so they both start and end with a base
477 decalc->trimSeqs(querySeqs[j], bestfit[j], trim);
482 mothurOut("Finding window breaks for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
483 for (int i = lines[process]->start; i < lines[process]->end; i++) {
484 it = trimmed[i].begin();
485 windowsForeachQuery[i] = decalc->findWindows(querySeqs[i], it->first, it->second, windowSizes[i], increment);
487 mothurOut("Done finding window breaks for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
489 //write out data to file so parent can read it
491 string s = toString(getpid()) + ".temp";
492 openOutputFile(s, out);
494 //output windowsForeachQuery
495 for (int i = lines[process]->start; i < lines[process]->end; i++) {
496 out << windowsForeachQuery[i].size() << '\t';
497 for (int j = 0; j < windowsForeachQuery[i].size(); j++) {
498 out << windowsForeachQuery[i][j] << '\t';
504 for (int i = lines[process]->start; i < lines[process]->end; i++) {
505 out << windowSizes[i] << '\t';
509 //output trimmed values
510 for (int i = lines[process]->start; i < lines[process]->end; i++) {
511 it = trimmed[i].begin();
513 out << it->first << '\t' << it->second << endl;
518 }else { mothurOut("unable to spawn the necessary processes."); mothurOutEndLine(); exit(0); }
521 //force parent to wait until all the processes are done
522 for (int i=0;i<processors;i++) {
523 int temp = processIDS[i];
527 //get data created by processes
528 for (int i=0;i<processors;i++) {
530 string s = toString(processIDS[i]) + ".temp";
531 openInputFile(s, in);
533 int size = lines[i]->end - lines[i]->start;
535 int count = lines[i]->start;
536 for (int m = 0; m < size; m++) {
540 vector<int> win; int w;
541 for (int j = 0; j < num; j++) {
546 windowsForeachQuery[count] = win;
552 count = lines[i]->start;
553 for (int m = 0; m < size; m++) {
557 windowSizes[count] = num;
563 count = lines[i]->start;
564 for (int m = 0; m < size; m++) {
585 for (int j = 0; j < bestfit.size(); j++) {
586 //chops off beginning and end of sequences so they both start and end with a base
587 decalc->trimSeqs(querySeqs[j], bestfit[j], trimmed[j]);
590 for (int i = lines[0]->start; i < lines[0]->end; i++) {
591 it = trimmed[i].begin();
592 map<int, int> win = decalc->findWindows(querySeqs[i], it->first, it->second, windowSizes[i], increment);
598 catch(exception& e) {
599 errorOut(e, "Pintail", "createProcessesSpots");
603 /**************************************************************************************************/
605 void Pintail::createProcessesPairs() {
607 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
609 vector<int> processIDS;
611 //loop through and create all the processes you want
612 while (process != processors) {
616 processIDS.push_back(pid);
620 mothurOut("Finding pairs for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
621 bestfit = findPairs(lines[process]->start, lines[process]->end);
622 mothurOut("Done finding pairs for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
624 //write out data to file so parent can read it
626 string s = toString(getpid()) + ".temp";
627 openOutputFile(s, out);
629 //output range and size
630 out << bestfit.size() << endl;
633 for (int i = 0; i < bestfit.size(); i++) {
634 out << ">" << bestfit[i]->getName() << endl << bestfit[i]->getAligned() << endl;
639 }else { mothurOut("unable to spawn the necessary processes."); mothurOutEndLine(); exit(0); }
642 //force parent to wait until all the processes are done
643 for (int i=0;i<processors;i++) {
644 int temp = processIDS[i];
648 //get data created by processes
649 for (int i=0;i<processors;i++) {
651 string s = toString(processIDS[i]) + ".temp";
652 openInputFile(s, in);
655 in >> size; gobble(in);
658 int count = lines[i]->start;
659 for (int m = 0; m < size; m++) {
660 Sequence* temp = new Sequence(in);
661 bestfit[count] = temp;
673 bestfit = findPairs(lines[0]->start, lines[0]->end);
676 catch(exception& e) {
677 errorOut(e, "Pintail", "createProcessesPairs");
681 /**************************************************************************************************/
683 void Pintail::createProcesses() {
685 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
687 vector<int> processIDS;
689 //loop through and create all the processes you want
690 while (process != processors) {
694 processIDS.push_back(pid);
698 mothurOut("Calculating observed, expected and de values for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
699 for (int i = lines[process]->start; i < lines[process]->end; i++) {
701 vector<float> obsi = decalc->calcObserved(querySeqs[i], bestfit[i], windowsForeachQuery[i], windowSizes[i]);
702 obsDistance[i] = obsi;
705 vector<float> q = decalc->findQav(windowsForeachQuery[i], windowSizes[i], probabilityProfile);
708 float alpha = decalc->getCoef(obsDistance[i], q);
711 vector<float> exp = decalc->calcExpected(q, alpha);
712 expectedDistance[i] = exp;
714 //get de and deviation
715 float dei = decalc->calcDE(obsi, exp);
718 it = trimmed[i].begin();
719 float dist = decalc->calcDist(querySeqs[i], bestfit[i], it->first, it->second);
722 mothurOut("Done calculating observed, expected and de values for sequences " + toString(lines[process]->start) + " to " + toString(lines[process]->end)); mothurOutEndLine();
724 //write out data to file so parent can read it
726 string s = toString(getpid()) + ".temp";
727 openOutputFile(s, out);
729 int size = lines[process]->end - lines[process]->start;
732 //output observed distances
733 for (int i = lines[process]->start; i < lines[process]->end; i++) {
734 out << obsDistance[i].size() << '\t';
735 for (int j = 0; j < obsDistance[i].size(); j++) {
736 out << obsDistance[i][j] << '\t';
742 //output expected distances
743 for (int i = lines[process]->start; i < lines[process]->end; i++) {
744 out << expectedDistance[i].size() << '\t';
745 for (int j = 0; j < expectedDistance[i].size(); j++) {
746 out << expectedDistance[i][j] << '\t';
753 for (int i = lines[process]->start; i < lines[process]->end; i++) {
754 out << DE[i] << '\t';
759 for (int i = lines[process]->start; i < lines[process]->end; i++) {
760 out << deviation[i] << '\t';
767 }else { mothurOut("unable to spawn the necessary processes."); mothurOutEndLine(); exit(0); }
770 //force parent to wait until all the processes are done
771 for (int i=0;i<processors;i++) {
772 int temp = processIDS[i];
776 //get data created by processes
777 for (int i=0;i<processors;i++) {
779 string s = toString(processIDS[i]) + ".temp";
780 openInputFile(s, in);
783 in >> size; gobble(in);
785 //get observed distances
786 int count = lines[i]->start;
787 for (int m = 0; m < size; m++) {
791 vector<float> obs; float w;
792 for (int j = 0; j < num; j++) {
797 obsDistance[count] = obs;
804 //get expected distances
805 count = lines[i]->start;
806 for (int m = 0; m < size; m++) {
810 vector<float> exp; float w;
811 for (int j = 0; j < num; j++) {
816 expectedDistance[count] = exp;
823 count = lines[i]->start;
824 for (int m = 0; m < size; m++) {
834 count = lines[i]->start;
835 for (int m = 0; m < size; m++) {
839 deviation[count] = num;
849 mothurOut("Calculating observed distance... "); cout.flush();
850 for (int i = lines[0]->start; i < lines[0]->end; i++) {
851 vector<float> obsi = decalc->calcObserved(querySeqs[i], bestfit[i], windows[i], windowSizes[i]);
852 obsDistance[i] = obsi;
854 mothurOut("Done."); mothurOutEndLine();
858 mothurOut("Finding variability... "); cout.flush();
859 for (int i = lines[0]->start; i < lines[0]->end; i++) {
860 vector<float> q = decalc->findQav(windows[i], windowSizes[i], probabilityProfile, h[i]);
863 mothurOut("Done."); mothurOutEndLine();
867 mothurOut("Calculating alpha... "); cout.flush();
868 for (int i = lines[0]->start; i < lines[0]->end; i++) {
869 float alpha = decalc->getCoef(obsDistance[i], Qav[i]);
870 seqCoef.push_back(alpha);
872 mothurOut("Done."); mothurOutEndLine();
876 mothurOut("Calculating expected distance... "); cout.flush();
877 for (int i = lines[0]->start; i < lines[0]->end; i++) {
878 vector<float> exp = decalc->calcExpected(Qav[i], seqCoef[i]);
879 expectedDistance[i] = exp;
881 mothurOut("Done."); mothurOutEndLine();
885 mothurOut("Finding deviation... "); cout.flush();
886 for (int i = lines[0]->start; i < lines[0]->end; i++) {
887 float de = decalc->calcDE(obsDistance[i], expectedDistance[i]);
890 it = trimmed[i].begin();
891 float dist = decalc->calcDist(querySeqs[i], bestfit[i], it->first, it->second);
894 mothurOut("Done."); mothurOutEndLine();
898 catch(exception& e) {
899 errorOut(e, "Pintail", "createProcesses");
905 /**************************************************************************************************/
907 void Pintail::createProcessesQuan() {
909 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
911 vector<int> processIDS;
913 //loop through and create all the processes you want
914 while (process != processors) {
918 processIDS.push_back(pid);
922 quantiles = decalc->getQuantiles(templateSeqs, windowSizesTemplate, window, probabilityProfile, increment, templateLines[process]->start, templateLines[process]->end);
924 //write out data to file so parent can read it
926 string s = toString(getpid()) + ".temp";
927 openOutputFile(s, out);
930 //output observed distances
931 for (int i = 0; i < quantiles.size(); i++) {
932 out << quantiles[i].size() << '\t';
933 for (int j = 0; j < quantiles[i].size(); j++) {
934 out << quantiles[i][j] << '\t';
942 }else { mothurOut("unable to spawn the necessary processes."); mothurOutEndLine(); exit(0); }
945 //force parent to wait until all the processes are done
946 for (int i=0;i<processors;i++) {
947 int temp = processIDS[i];
951 //get data created by processes
952 for (int i=0;i<processors;i++) {
954 string s = toString(processIDS[i]) + ".temp";
955 openInputFile(s, in);
957 vector< vector<float> > quan; quan.resize(100);
960 for (int m = 0; m < quan.size(); m++) {
964 vector<float> q; float w;
965 for (int j = 0; j < num; j++) {
975 //save quan in quantiles
976 for (int i = 0; i < quan.size(); i++) {
977 //put all values of q[i] into quan[i]
978 quantiles[i].insert(quantiles[i].begin(), quan[i].begin(), quan[i].end());
986 quantiles = decalc->getQuantiles(templateSeqs, windowSizesTemplate, window, probabilityProfile, increment, 0, templateSeqs.size());
989 catch(exception& e) {
990 errorOut(e, "Pintail", "createProcessesQuan");
996 //***************************************************************************************************************