else if (refTaxonomy == "not open") { abort = true; }
namefile = validParameter.validFile(parameters, "name", true);
- if (namefile == "not open") { abort = true; }
+ if (namefile == "not open") { namefile = ""; abort = true; }
else if (namefile == "not found") { namefile = ""; }
else { m->setNameFile(namefile); }
if ((basis != "otu") && (basis != "sequence")) { m->mothurOut("Invalid option for basis. basis options are otu and sequence, using otu."); m->mothurOutEndLine(); }
string temp = validParameter.validFile(parameters, "cutoff", false); if (temp == "not found") { temp = "51"; }
- convert(temp, cutoff);
+ m->mothurConvert(temp, cutoff);
temp = validParameter.validFile(parameters, "probs", false); if (temp == "not found"){ temp = "true"; }
probs = m->isTrue(temp);
if ((cutoff < 51) || (cutoff > 100)) { m->mothurOut("cutoff must be above 50, and no greater than 100."); m->mothurOutEndLine(); abort = true; }
+ if (namefile == ""){
+ vector<string> files; files.push_back(taxfile);
+ parser.getNameFile(files);
+ }
+
}
}
catch(exception& e) {
}
}
+
+ //phylotree adds an extra unknown so we want to remove that
+ if (bestChild.name == "unknown") { bestChildSize--; }
//is this taxonomy above cutoff
int consensusConfidence = ceil((bestChildSize / (float) size) * 100);
taxaSum = new PhyloSummary(groupfile);
}
+
//for each bin in the list vector
+ string snumBins = toString(processList->getNumBins());
for (int i = 0; i < processList->getNumBins(); i++) {
if (m->control_pressed) { break; }
if (m->control_pressed) { out.close(); return 0; }
//output to new names file
- out << (i+1) << '\t' << size << '\t' << conTax << endl;
+ string binLabel = "Otu";
+ string sbinNumber = toString(i+1);
+ if (sbinNumber.length() < snumBins.length()) {
+ int diff = snumBins.length() - sbinNumber.length();
+ for (int h = 0; h < diff; h++) { binLabel += "0"; }
+ }
+ binLabel += sbinNumber;
+
+ out << binLabel << '\t' << size << '\t' << conTax << endl;
string noConfidenceConTax = conTax;
m->removeConfidences(noConfidenceConTax);