X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=taxonomyequalizer.h;fp=taxonomyequalizer.h;h=191267c1a44833c69437b2f8dbbb616e7566cf60;hb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;hp=0000000000000000000000000000000000000000;hpb=1b73ff67c83892a025e597dabd9df6fe7b58206a;p=mothur.git diff --git a/taxonomyequalizer.h b/taxonomyequalizer.h new file mode 100644 index 0000000..191267c --- /dev/null +++ b/taxonomyequalizer.h @@ -0,0 +1,51 @@ +#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" +#include "mothurout.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, string); + ~TaxEqualizer() {}; + + string getEqualizedTaxFile() { return equalizedFile; } + int getHighestLevel() { return highestLevel; } + + +private: + string equalizedFile, testTax, outputDir; + bool containsConfidence; + int cutoff, highestLevel; + 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 + MothurOut* m; + +}; + +/**************************************************************************************************/ + + +#endif + +