X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=screenseqscommand.cpp;h=e7b2c6acedf523f8249c8159ed186a6b8d5b8892;hb=a0f1fca79d2ddfa7ad36b4485039c68b5704fe8d;hp=3718c9a9c0cf843d9f91311b8b7b3cdee814f455;hpb=a54ba6143022dc7294f4fdc468fc10b627c64b0e;p=mothur.git diff --git a/screenseqscommand.cpp b/screenseqscommand.cpp index 3718c9a..e7b2c6a 100644 --- a/screenseqscommand.cpp +++ b/screenseqscommand.cpp @@ -683,7 +683,7 @@ int ScreenSeqsCommand::screenReports(map& badSeqNames){ if (namefile != "") { nameMap = m->readNames(namefile); } else if (countfile != "") { CountTable ct; - ct.readTable(countfile); + ct.readTable(countfile, true); nameMap = ct.getNameMap(); } getSummary(positions); @@ -714,7 +714,7 @@ int ScreenSeqsCommand::screenReports(map& badSeqNames){ if (namefile != "") { nameMap = m->readNames(namefile); } else if (countfile != "") { CountTable ct; - ct.readTable(countfile); + ct.readTable(countfile, true); nameMap = ct.getNameMap(); } getSummaryReport(); @@ -817,7 +817,7 @@ int ScreenSeqsCommand::screenAlignReport(map& badSeqNames){ m->mothurRemove(outSummary+".temp"); } - if (numFastaSeqs != count) { m->mothurOut("[ERROR]: found " + toString(numFastaSeqs) + " sequences in your fasta file, and " + toString(count) + " sequences in your contigs report file, quitting.\n"); m->control_pressed = true; } + if (numFastaSeqs != count) { m->mothurOut("[ERROR]: found " + toString(numFastaSeqs) + " sequences in your fasta file, and " + toString(count) + " sequences in your align report file, quitting.\n"); m->control_pressed = true; } return count; @@ -1019,7 +1019,7 @@ int ScreenSeqsCommand::screenFasta(map& badSeqNames){ if (namefile != "") { nameMap = m->readNames(namefile); } else if (countfile != "") { CountTable ct; - ct.readTable(countfile); + ct.readTable(countfile, true); nameMap = ct.getNameMap(); } getSummary(positions); @@ -1820,7 +1820,6 @@ int ScreenSeqsCommand::getSummary(vector& positions){ vector longHomoPolymer; vector numNs; - vector positions; #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) positions = m->divideFile(fastafile, processors); for (int i = 0; i < (positions.size()-1); i++) { lines.push_back(linePair(positions[i], positions[(i+1)])); } @@ -1845,8 +1844,9 @@ int ScreenSeqsCommand::getSummary(vector& positions){ int pid; MPI_Comm_rank(MPI_COMM_WORLD, &pid); - if (pid == 0) { - driverCreateSummary(startPosition, endPosition, seqLength, ambigBases, longHomoPolymer, numNs, fastafile, lines[0]); + if (pid == 0) { + linePair tempLine(0, positions[positions.size()-1]); + driverCreateSummary(startPosition, endPosition, seqLength, ambigBases, longHomoPolymer, numNs, fastafile, tempLine); #else int numSeqs = 0; //#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) @@ -2206,7 +2206,7 @@ int ScreenSeqsCommand::screenCountFile(map badSeqNames){ //check for groups that have been eliminated CountTable ct; if (ct.testGroups(goodCountFile)) { - ct.readTable(goodCountFile); + ct.readTable(goodCountFile, true); ct.printTable(goodCountFile); } @@ -2409,10 +2409,10 @@ int ScreenSeqsCommand::driver(linePair filePos, string goodFName, string badAccn #endif //report progress - if((count) % 100 == 0){ m->mothurOut("Processing sequence: " + toString(count)); m->mothurOutEndLine(); } + if((count) % 100 == 0){ m->mothurOutJustToScreen("Processing sequence: " + toString(count)+"\n"); } } //report progress - if((count) % 100 != 0){ m->mothurOut("Processing sequence: " + toString(count)); m->mothurOutEndLine(); } + if((count) % 100 != 0){ m->mothurOutJustToScreen("Processing sequence: " + toString(count)+"\n"); } goodFile.close(); @@ -2504,7 +2504,7 @@ int ScreenSeqsCommand::driverMPI(int start, int num, MPI_File& inMPI, MPI_File& } //report progress - if((i) % 100 == 0){ m->mothurOut("Processing sequence: " + toString(i)); m->mothurOutEndLine(); } + if((i) % 100 == 0){ m->mothurOutJustToScreen("Processing sequence: " + toString(i)+"\n"); } } return 1;