X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=pintail.cpp;h=b9f2434d19d4cc842bfac1dce4f6de5a0d1b742d;hp=b04efea9ba2c59b06dff4bf599d492dc2f9cd0e2;hb=a8e2df1b96a57f5f29576b08361b86a96a8eff4f;hpb=4b6e3f7b5543822a2cca4fb076ab6af2ce8ca62d diff --git a/pintail.cpp b/pintail.cpp index b04efea..b9f2434 100644 --- a/pintail.cpp +++ b/pintail.cpp @@ -74,7 +74,7 @@ int Pintail::doPrep() { #ifdef USE_MPI //do nothing #else - #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) + #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) //find breakup of templatefile for quantiles if (processors == 1) { templateLines.push_back(new linePair(0, templateSeqs.size())); } else { @@ -170,13 +170,13 @@ int Pintail::doPrep() { string noOutliers, outliers; if ((!filter) && (seqMask == "")) { - noOutliers = templateFileName + "pintail.quan"; + noOutliers = m->getRootName(m->getSimpleName(templateFileName)) + "pintail.quan"; }else if ((!filter) && (seqMask != "")) { - noOutliers =templateFileName + "pintail.masked.quan"; + noOutliers =m->getRootName(m->getSimpleName(templateFileName)) + "pintail.masked.quan"; }else if ((filter) && (seqMask != "")) { - noOutliers = templateFileName + "pintail.filtered." + m->getSimpleName(m->getRootName(fastafile)) + "masked.quan"; + noOutliers = m->getRootName(m->getSimpleName(templateFileName)) + "pintail.filtered." + m->getSimpleName(m->getRootName(fastafile)) + "masked.quan"; }else if ((filter) && (seqMask == "")) { - noOutliers = templateFileName + "pintail.filtered." + m->getSimpleName(m->getRootName(fastafile)) + "quan"; + noOutliers = m->getRootName(m->getSimpleName(templateFileName)) + "pintail.filtered." + m->getSimpleName(m->getRootName(fastafile)) + "quan"; } decalc->removeObviousOutliers(quantilesMembers, templateSeqs.size()); @@ -249,7 +249,7 @@ int Pintail::doPrep() { } } //*************************************************************************************************************** -Sequence* Pintail::print(ostream& out, ostream& outAcc) { +Sequence Pintail::print(ostream& out, ostream& outAcc) { try { int index = ceil(deviation); @@ -280,7 +280,7 @@ Sequence* Pintail::print(ostream& out, ostream& outAcc) { for (int m = 0; m < expectedDistance.size(); m++) { out << expectedDistance[m] << '\t'; } out << endl; - return NULL; + return *querySeq; } catch(exception& e) { @@ -290,7 +290,7 @@ Sequence* Pintail::print(ostream& out, ostream& outAcc) { } #ifdef USE_MPI //*************************************************************************************************************** -Sequence* Pintail::print(MPI_File& out, MPI_File& outAcc) { +Sequence Pintail::print(MPI_File& out, MPI_File& outAcc) { try { string outputString = ""; @@ -320,7 +320,7 @@ Sequence* Pintail::print(MPI_File& out, MPI_File& outAcc) { MPI_File_write_shared(outAcc, buf, length, MPI_CHAR, &statusAcc); delete buf; - return NULL; + return *querySeq; } outputString += "Observed\t"; @@ -340,7 +340,7 @@ Sequence* Pintail::print(MPI_File& out, MPI_File& outAcc) { MPI_File_write_shared(out, buf2, length, MPI_CHAR, &status); delete buf2; - return NULL; + return *querySeq; } catch(exception& e) { m->errorOut(e, "Pintail", "print"); @@ -529,7 +529,7 @@ Sequence* Pintail::findPairs(Sequence* q) { //************************************************************************************************** void Pintail::createProcessesQuan() { try { -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) int process = 1; vector processIDS; @@ -612,7 +612,7 @@ void Pintail::createProcessesQuan() { } in.close(); - remove(s.c_str()); + m->mothurRemove(s); } #else