containsConfidence = false;
ifstream inTax;
- openInputFile(tfile, inTax);
+ m->openInputFile(tfile, inTax);
highestLevel = getHighestLevel(inTax);
inTax.close();
ifstream in;
- openInputFile(tfile, in);
+ m->openInputFile(tfile, in);
ofstream out;
- equalizedFile = outputDir + getRootName(getSimpleName(tfile)) + "equalized.taxonomy";
- openOutputFile(equalizedFile, out);
+ equalizedFile = outputDir + m->getRootName(m->getSimpleName(tfile)) + "equalized.taxonomy";
+ m->openOutputFile(equalizedFile, out);
string name, tax;
if (m->control_pressed) { break; }
- in >> name >> tax; gobble(in);
+ in >> name >> tax; m->gobble(in);
if (containsConfidence) { removeConfidences(tax); }
in.close();
out.close();
- if (m->control_pressed) { remove(equalizedFile.c_str()); }
+ if (m->control_pressed) { m->mothurRemove(equalizedFile); }
}else { inTax.close(); }
}
string name, tax;
while (in) {
- in >> name >> tax; gobble(in);
+ in >> name >> tax; m->gobble(in);
//count levels in this taxonomy
int thisLevel = 0;
//save sequences level
seqLevels[name] = thisLevel;
-
+
//is this the longest taxonomy?
if (thisLevel > level) {
level = thisLevel;
testTax = tax; //testTax is used to figure out if this file has confidences we need to strip out
- }
+ }
}
int pos = testTax.find_first_of('(');
//if there are '(' then there are confidences we need to take out
if (pos != -1) { containsConfidence = true; }
-
+
return level;
}