- if (secondCol != "") { if (secondCol[secondCol.length()-1] != ';') { mothurOut("[ERROR]: " + firstCol + " is missing the final ';', ignoring.\n"); ignore=true; }
- }
- if (!ignore) { taxMap[firstCol] = secondCol; }
- if (debug) { mothurOut("[DEBUG]: name = '" + firstCol + "' tax = '" + secondCol + "'\n"); }
- }else {
- mothurOut("[ERROR]: " + firstCol + " is already in your taxonomy file, names must be unique.\n"); error = true;
- }
- pairDone = false;
+ checkName(name);
+ //are there confidence scores, if so remove them
+ if (removeConfidence) { if (taxonomy.find_first_of('(') != -1) { removeConfidences(taxonomy); } }
+ if (taxonomy != "") { if (taxonomy[taxonomy.length()-1] != ';') { mothurOut("[ERROR]: " + name + " is missing the final ';', ignoring.\n"); ignore=true; }
}
+ if (!ignore) { taxMap[name] = taxonomy; }
+ if (debug) { mothurOut("[DEBUG]: name = '" + name + "' tax = '" + taxonomy + "'\n"); }
+ }else {
+ mothurOut("[ERROR]: " + name + " is already in your taxonomy file, names must be unique./n"); error = true;
}
- }
- in.close();
-
- if (rest != "") {
- vector<string> pieces = splitWhiteSpace(rest);
-
- for (int i = 0; i < pieces.size(); i++) {
- if (columnOne) { firstCol = pieces[i]; columnOne=false; }
- if (secondCol != "") { if (secondCol[secondCol.length()-1] != ';') { mothurOut("[ERROR]: " + firstCol + " is missing the final ';', ignoring.\n"); ignore=true; }
- }
- if (!ignore) { taxMap[firstCol] = secondCol; }
- if (debug) { mothurOut("[DEBUG]: name = '" + firstCol + "' tax = '" + secondCol + "'\n"); }
- }else {
- mothurOut("[ERROR]: " + firstCol + " is already in your taxonomy file, names must be unique./n"); error = true;
0 comments on commit
5a9d908