if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
m->mothurOut("Selected " + toString(names.size()) + " sequences. From the groups: "); m->mothurOutEndLine();
- for (int i = 0; i < Groups.size(); i++) { m->mothurOut(Groups[i]); m->mothurOut(" contains " + toString(groupMap->getNumSeqs(Groups[i])) + " sequences."); m->mothurOutEndLine(); }
+ for (int i = 0; i < Groups.size(); i++) { m->mothurOut(Groups[i]); m->mothurOut("\t" + toString(groupMap->getNumSeqs(Groups[i]))); m->mothurOutEndLine(); }
m->mothurOutEndLine();
-
-
if (outputNames.size() != 0) {
m->mothurOutEndLine();
m->mothurOut("Output File names: "); m->mothurOutEndLine();
if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
m->mothurOut("Removed " + toString(names.size()) + " sequences. From the groups: "); m->mothurOutEndLine();
- for (int i = 0; i < Groups.size(); i++) { m->mothurOut(Groups[i]); m->mothurOut(" contains " + toString(groupMap->getNumSeqs(Groups[i])) + " sequences."); m->mothurOutEndLine(); }
+ for (int i = 0; i < Groups.size(); i++) { m->mothurOut(Groups[i]); m->mothurOut("\t" + toString(groupMap->getNumSeqs(Groups[i]))); m->mothurOutEndLine(); }
m->mothurOutEndLine();
if (outputNames.size() != 0) {
CommandParameter pname("name", "InputTypes", "", "", "none", "none", "none",false,false); parameters.push_back(pname);
CommandParameter pignorechimeras("ignorechimeras", "Boolean", "", "T", "", "", "",false,false); parameters.push_back(pignorechimeras);
CommandParameter pthreshold("threshold", "Number", "", "1.0", "", "", "",false,false); parameters.push_back(pthreshold);
+ CommandParameter pprocessors("processors", "Number", "", "1", "", "", "",false,false); parameters.push_back(pprocessors);
CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir);
CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir);
temp = validParameter.validFile(parameters, "ignorechimeras", false); if (temp == "not found") { temp = "1"; }
convert(temp, ignoreChimeras);
+
+ temp = validParameter.validFile(parameters, "processors", false); if (temp == "not found"){ temp = m->getProcessors(); }
+ m->setProcessors(temp);
+ convert(temp, processors);
substitutionMatrix.resize(6);
for(int i=0;i<6;i++){ substitutionMatrix[i].resize(6,0); }
string queryFileName, referenceFileName, qualFileName, reportFileName, namesFileName, outputDir;
double threshold;
bool ignoreChimeras;
- int numRefs;
+ int numRefs, processors;
int maxLength;
ofstream errorSummaryFile, errorSeqFile;
vector<string> outputNames;
//output group counts
m->mothurOutEndLine();
int total = 0;
+ if (groupCounts.size() != 0) { m->mothurOut("Group count: \n"); }
for (map<string, int>::iterator it = groupCounts.begin(); it != groupCounts.end(); it++) {
- total += it->second; m->mothurOut("Group " + it->first + " contains " + toString(it->second) + " sequences."); m->mothurOutEndLine();
+ total += it->second; m->mothurOut(it->first + "\t" + toString(it->second)); m->mothurOutEndLine();
}
if (total != 0) { m->mothurOut("Total of all groups is " + toString(total)); m->mothurOutEndLine(); }
outGroupsFile << currSeq.getName() << '\t' << thisGroup << endl;
+ if (nameFile != "") {
+ map<string, string>::iterator itName = nameMap.find(currSeq.getName());
+ if (itName != nameMap.end()) {
+ vector<string> thisSeqsNames;
+ m->splitAtChar(itName->second, thisSeqsNames, ',');
+ for (int k = 1; k < thisSeqsNames.size(); k++) { //start at 1 to skip self
+ outGroupsFile << thisSeqsNames[k] << '\t' << thisGroup << endl;
+ }
+ }else { m->mothurOut("[ERROR]: " + currSeq.getName() + " is not in your namefile, please correct."); m->mothurOutEndLine(); }
+ }
+
map<string, int>::iterator it = groupCounts.find(thisGroup);
if (it == groupCounts.end()) { groupCounts[thisGroup] = 1; }
else { groupCounts[it->first]++; }