X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=screenseqscommand.cpp;h=051aa99434f6bb21a8d3b3b54cb2cc671eab98d2;hb=1a968f34ae2d2680eaf189a197d1a21b8dfd6c03;hp=51495506c6e7a3303c6a87d0510a87e44f1810f6;hpb=eb71e28b7b7afd82540f4a8f0bac9429c5b9d713;p=mothur.git diff --git a/screenseqscommand.cpp b/screenseqscommand.cpp index 5149550..051aa99 100644 --- a/screenseqscommand.cpp +++ b/screenseqscommand.cpp @@ -294,7 +294,8 @@ ScreenSeqsCommand::ScreenSeqsCommand(string option) { summaryfile = validParameter.validFile(parameters, "summary", true); if (summaryfile == "not open") { summaryfile = ""; abort = true; } - else if (summaryfile == "not found") { summaryfile = ""; } + else if (summaryfile == "not found") { summaryfile = ""; } + else { m->setSummaryFile(summaryfile); } if ((namefile != "") && (countfile != "")) { m->mothurOut("[ERROR]: you may only use one of the following: name or count."); m->mothurOutEndLine(); abort = true; @@ -682,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); @@ -713,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(); @@ -1018,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); @@ -1080,8 +1081,6 @@ int ScreenSeqsCommand::screenNameGroupFile(map badSeqNames){ it = badSeqNames.find(seqName); if(it != badSeqNames.end()){ - badSeqNames.erase(it); - if(namefile != ""){ int start = 0; for(int i=0;i badSeqNames){ } badSeqGroups[seqList.substr(start,seqList.length()-start)] = it->second; } + badSeqNames.erase(it); } else{ goodNameOut << seqName << '\t' << seqList << endl; @@ -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); } @@ -2302,7 +2302,7 @@ int ScreenSeqsCommand::screenQual(map badSeqNames){ saveName = name.substr(1); while (!in.eof()) { char c = in.get(); - if (c == 10 || c == 13){ break; } + if (c == 10 || c == 13 || c == -1){ break; } else { name += c; } } m->gobble(in); @@ -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;