ifstream inTax;
openInputFile(tfile, inTax);
- int highestLevel = getHighestLevel(inTax);
+ highestLevel = getHighestLevel(inTax);
//if the user has specified a cutoff and it's smaller than the highest level
if ((cutoff != -1) && (cutoff < highestLevel)) {
mothurOutEndLine();
}
- inTax.close();
- openInputFile(tfile, inTax);
+ inTax.close();
+ ifstream in;
+ openInputFile(tfile, in);
ofstream out;
equalizedFile = getRootName(tfile) + "equalized.taxonomy";
openOutputFile(equalizedFile, out);
string name, tax;
- while (inTax) {
- inTax >> name >> tax; gobble(inTax);
+ while (in) {
+ in >> name >> tax; gobble(in);
if (containsConfidence) { removeConfidences(tax); }
//is this a taxonomy that needs to be extended?
if (seqLevels[name] < highestLevel) {
extendTaxonomy(name, tax, highestLevel);
- }else if (seqLevels[name] > highestLevel) { //this can happen if hte user enters a cutoff
+ }else if (seqLevels[name] > highestLevel) { //this can happen if the user enters a cutoff
truncateTaxonomy(name, tax, highestLevel);
}
out << name << '\t' << tax << endl;
}
- inTax.close();
+ in.close();
out.close();
}