- mothurOut("Calculating observed distance... "); cout.flush();
- for (int i = lines[0]->start; i < lines[0]->end; i++) {
- vector<float> obsi = decalc->calcObserved(querySeqs[i], bestfit[i], windows[i], windowSizes[i]);
- obsDistance[i] = obsi;
- }
- mothurOut("Done."); mothurOutEndLine();
-
-
+ quantilesMembers = decalc->getQuantiles(templateSeqs, windowSizesTemplate, window, probabilityProfile, increment, 0, templateSeqs.size());
+#endif
+ }
+ catch(exception& e) {
+ m->errorOut(e, "Pintail", "createProcessesQuan");
+ exit(1);
+ }
+}
+//***************************************************************************************************************
+vector< vector<float> > Pintail::readQuantiles() {
+ try {
+ int num;
+ float ten, twentyfive, fifty, seventyfive, ninetyfive, ninetynine;
+
+ vector< vector<float> > quan;
+ vector <float> temp; temp.resize(6, 0);
+
+ //to fill 0
+ quan.push_back(temp);
+
+ #ifdef USE_MPI
+
+ MPI_File inMPI;
+ MPI_Offset size;
+ MPI_Status status;
+
+ //char* inFileName = new char[quanfile.length()];
+ //memcpy(inFileName, quanfile.c_str(), quanfile.length());
+
+ char inFileName[1024];
+ strcpy(inFileName, quanfile.c_str());
+
+ MPI_File_open(MPI_COMM_WORLD, inFileName, MPI_MODE_RDONLY, MPI_INFO_NULL, &inMPI);
+ MPI_File_get_size(inMPI, &size);
+ //delete inFileName;
+
+
+ char* buffer = new char[size];
+ MPI_File_read(inMPI, buffer, size, MPI_CHAR, &status);
+
+ string tempBuf = buffer;
+ if (tempBuf.length() > size) { tempBuf = tempBuf.substr(0, size); }
+ istringstream iss (tempBuf,istringstream::in);
+ delete buffer;
+
+ //read version
+ string line = m->getline(iss); m->gobble(iss);
+
+ while(!iss.eof()) {
+ iss >> num >> ten >> twentyfive >> fifty >> seventyfive >> ninetyfive >> ninetynine;