X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=phylosummary.cpp;fp=phylosummary.cpp;h=22e8e75ce7047e00b135483f16b566eb506a71fb;hb=74dc92cf53df65fd8b14d8eaf35489bbecbccac6;hp=b645bac794777a1050de116407fa834370e7940e;hpb=4c5e7a20a03ddc6feb49ff9d21fcb4c79bc5508d;p=mothur.git diff --git a/phylosummary.cpp b/phylosummary.cpp index b645bac..22e8e75 100644 --- a/phylosummary.cpp +++ b/phylosummary.cpp @@ -131,7 +131,7 @@ int PhyloSummary::addSeqToTree(string seqName, string seqTaxonomy){ int level = 0; //are there confidence scores, if so remove them - if (seqTaxonomy.find_first_of('(') != -1) { removeConfidences(seqTaxonomy); } + if (seqTaxonomy.find_first_of('(') != -1) { m->removeConfidences(seqTaxonomy); } while (seqTaxonomy != "") { @@ -229,7 +229,7 @@ int PhyloSummary::addSeqToTree(string seqTaxonomy, vector names){ int level = 0; //are there confidence scores, if so remove them - if (seqTaxonomy.find_first_of('(') != -1) { removeConfidences(seqTaxonomy); } + if (seqTaxonomy.find_first_of('(') != -1) { m->removeConfidences(seqTaxonomy); } while (seqTaxonomy != "") { @@ -496,35 +496,6 @@ void PhyloSummary::readTreeStruct(ifstream& in){ } } /**************************************************************************************************/ -void PhyloSummary::removeConfidences(string& tax) { - try { - - string taxon; - string newTax = ""; - - while (tax.find_first_of(';') != -1) { - //get taxon - taxon = tax.substr(0,tax.find_first_of(';')); - - int pos = taxon.find_first_of('('); - if (pos != -1) { - taxon = taxon.substr(0, pos); //rip off confidence - } - - taxon += ";"; - - tax = tax.substr(tax.find_first_of(';')+1, tax.length()); - newTax += taxon; - } - - tax = newTax; - } - catch(exception& e) { - m->errorOut(e, "PhyloSummary", "removeConfidences"); - exit(1); - } -} -/**************************************************************************************************/