if (hasConPos != string::npos) {
taxonsHasConfidence[i] = true;
searchTaxons[i] = getTaxons(listOfTaxons[i]);
- noConfidenceTaxons[i] = removeConfidences(listOfTaxons[i]);
+ noConfidenceTaxons[i] = listOfTaxons[i];
+ m->removeConfidences(noConfidenceTaxons[i]);
}
}
if (!taxonsHasConfidence[j]) {
int hasConfidences = tax.find_first_of('(');
if (hasConfidences != string::npos) {
- newtax = removeConfidences(tax);
+ newtax = tax;
+ m->removeConfidences(newtax);
}
int pos = newtax.find(noConfidenceTaxons[j]);
string noNewTax = tax;
int hasConfidences = tax.find_first_of('(');
if (hasConfidences != string::npos) {
- noNewTax = removeConfidences(tax);
+ noNewTax = tax;
+ m->removeConfidences(noNewTax);
}
int pos = noNewTax.find(noConfidenceTaxons[j]);
exit(1);
}
}
-/**************************************************************************************************/
-string GetLineageCommand::removeConfidences(string tax) {
- try {
-
- string taxon = "";
- int taxLength = tax.length();
- for(int i=0;i<taxLength;i++){
- if(tax[i] == ';'){
- taxon = taxon.substr(0, taxon.find_first_of('(')); //rip off confidence
- taxon += ";";
- }
- else{
- taxon += tax[i];
- }
- }
-
- return taxon;
- }
- catch(exception& e) {
- m->errorOut(e, "GetLineageCommand", "removeConfidences");
- exit(1);
- }
-}
//**********************************************************************************************************************
//alignreport file has a column header line then all other lines contain 16 columns. we just want the first column since that contains the name
int GetLineageCommand::readAlign(){