X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=seqsummarycommand.cpp;h=27bb8d95190fb66ea03510cf266d2d53824d988c;hb=372fb21ea66ced432b109225851a1b80ef0491a3;hp=fdf95ee6fc5f87ed7629de936f4b0543dc89906a;hpb=14cddf859d97118481161bf3e85a647976020758;p=mothur.git diff --git a/seqsummarycommand.cpp b/seqsummarycommand.cpp index fdf95ee..27bb8d9 100644 --- a/seqsummarycommand.cpp +++ b/seqsummarycommand.cpp @@ -203,7 +203,7 @@ int SeqSummaryCommand::execute(){ if (namefile != "") { nameMap = m->readNames(namefile); } else if (countfile != "") { CountTable ct; - ct.readTable(countfile); + ct.readTable(countfile, false); nameMap = ct.getNameMap(); } @@ -415,6 +415,13 @@ int SeqSummaryCommand::execute(){ } #endif + //set fasta file as new current fastafile + string current = ""; + itTypes = outputTypes.find("summary"); + if (itTypes != outputTypes.end()) { + if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setSummaryFile(current); } + } + return 0; } catch(exception& e) { @@ -445,11 +452,15 @@ int SeqSummaryCommand::driverCreateSummary(vector& startPosition, vectorcontrol_pressed) { in.close(); outSummary.close(); return 1; } - + + if (m->debug) { m->mothurOut("[DEBUG]: count = " + toString(count) + "\n"); } + Sequence current(in); m->gobble(in); if (current.getName() != "") { + if (m->debug) { m->mothurOut("[DEBUG]: " + current.getName() + '\t' + toString(current.getNumBases()) + "\n"); } + int num = 1; if ((namefile != "") || (countfile != "")) { //make sure this sequence is in the namefile, else error @@ -473,6 +484,8 @@ int SeqSummaryCommand::driverCreateSummary(vector& startPosition, vectordebug) { m->mothurOut("[DEBUG]: " + current.getName() + '\t' + toString(current.getNumBases()) + "\n"); } } #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) @@ -481,13 +494,8 @@ int SeqSummaryCommand::driverCreateSummary(vector& startPosition, vectormothurOut(toString(count)); m->mothurOutEndLine(); } } - //report progress - //if((count) % 100 != 0){ m->mothurOut(toString(count)); m->mothurOutEndLine(); } - + in.close(); return count;