X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=taxonomyequalizer.h;fp=taxonomyequalizer.h;h=6308d7168e72651f349ab3bf0a28942949063f62;hb=7a2154809d332281cf4006943a9bd94b8208c837;hp=0000000000000000000000000000000000000000;hpb=9354b70bb84f6dd52ff4a1955754bcbf7edeedbf;p=mothur.git diff --git a/taxonomyequalizer.h b/taxonomyequalizer.h new file mode 100644 index 0000000..6308d71 --- /dev/null +++ b/taxonomyequalizer.h @@ -0,0 +1,50 @@ +#ifndef TAXONOMYEQUALIZER_H +#define TAXONOMYEQUALIZER_H + + +/* + * taxonomyequalizer.h + * Mothur + * + * Created by westcott on 11/20/09. + * Copyright 2009 Schloss Lab. All rights reserved. + * + */ + +#include "mothur.h" + +//reads in taxonomy file and makes all the taxonomies the same length +//by appending the last taxon to a given taxonomy as many times as needed to +//make it as long as the longest taxonomy in the file + +/**************************************************************************************************/ + +class TaxEqualizer { + +public: + TaxEqualizer(string, int); + ~TaxEqualizer() {}; + + string getEqualizedTaxFile() { return equalizedFile; } + + +private: + string equalizedFile, testTax; + bool containsConfidence; + int cutoff; + map seqLevels; //maps name to level of taxonomy + + int getHighestLevel(ifstream&); //scans taxonomy file to find taxonomy with highest level + void extendTaxonomy(string, string&, int); //name, taxonomy, desired level + void truncateTaxonomy(string, string&, int); //name, taxonomy, desired level + void removeConfidences(string&); //removes the confidence limits on the taxon + + +}; + +/**************************************************************************************************/ + + +#endif + +