X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trimseqscommand.cpp;h=ae9c436440950cca6cd33eb99e85c5b9b4db1062;hb=4a2d841cb97fb02351022efe9d7068b1dc212bf9;hp=a544733375b004e651409ef47c9db62bb0f0756d;hpb=5a86e9e5a5a9e061e17b3ae64fb8881f14e53b8a;p=mothur.git diff --git a/trimseqscommand.cpp b/trimseqscommand.cpp index a544733..ae9c436 100644 --- a/trimseqscommand.cpp +++ b/trimseqscommand.cpp @@ -266,13 +266,13 @@ int TrimSeqsCommand::execute(){ if (m->control_pressed) { return 0; } #else ifstream inFASTA; - openInputFile(fastafileNames[s], inFASTA); - numSeqs=count(istreambuf_iterator(inFASTA),istreambuf_iterator(), '>'); + openInputFile(fastaFile, inFASTA); + int numSeqs=count(istreambuf_iterator(inFASTA),istreambuf_iterator(), '>'); inFASTA.close(); lines.push_back(new linePair(0, numSeqs)); - driverCreateSummary(fastafile, qFileName, trimSeqFile, scrapSeqFile, groupFile, fastaFileNames, lines[0], lines[0]); + driverCreateTrim(fastaFile, qFileName, trimSeqFile, scrapSeqFile, groupFile, fastaFileNames, lines[0], lines[0]); if (m->control_pressed) { return 0; } #endif @@ -331,7 +331,11 @@ int TrimSeqsCommand::driverCreateTrim(string filename, string qFileName, string if (oligoFile != "") { openOutputFile(groupFile, outGroups); for (int i = 0; i < fastaNames.size(); i++) { + #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) fastaFileNames.push_back(new ofstream((fastaNames[i] + toString(getpid()) + ".temp").c_str(), ios::ate)); + #else + fastaFileNames.push_back(new ofstream((fastaNames[i] + toString(i) + ".temp").c_str(), ios::ate)); + #endif } } @@ -674,12 +678,7 @@ int TrimSeqsCommand::stripBarcode(Sequence& seq, int& group){ } oligo = oligo.substr(0,alnLength); temp = temp.substr(0,alnLength); -// cout << "barcode = " << oligo << " raw = " << rawSequence.substr(0,alnLength) << " raw aligned = " << temp << endl; - cout << seq.getName() << endl; - cout << temp << endl; - cout << oligo << endl; - cout << alnLength << endl; - cout << endl; +// int newStart=0; int numDiff = countDiffs(oligo, temp); @@ -789,13 +788,7 @@ int TrimSeqsCommand::stripForward(Sequence& seq){ } oligo = oligo.substr(0,alnLength); temp = temp.substr(0,alnLength); -// cout << "barcode = " << oligo << " raw = " << rawSequence.substr(0,alnLength) << " raw aligned = " << temp << endl; - cout << seq.getName() << endl; - cout << temp << endl; - cout << oligo << endl; - cout << alnLength << endl; - cout << endl; - +// int newStart=0; int numDiff = countDiffs(oligo, temp); if(numDiff < minDiff){