]> git.donarmstrong.com Git - mothur.git/blob - taxonomyequalizer.h
fixes while testing 1.33.0
[mothur.git] / taxonomyequalizer.h
1 #ifndef TAXONOMYEQUALIZER_H
2 #define TAXONOMYEQUALIZER_H
3
4
5 /*
6  *  taxonomyequalizer.h
7  *  Mothur
8  *
9  *  Created by westcott on 11/20/09.
10  *  Copyright 2009 Schloss Lab. All rights reserved.
11  *
12  */
13
14 #include "mothur.h"
15 #include "mothurout.h"
16
17 //reads in taxonomy file and makes all the taxonomies the same length 
18 //by appending the last taxon to a given taxonomy as many times as needed to 
19 //make it as long as the longest taxonomy in the file 
20
21 /**************************************************************************************************/
22
23 class TaxEqualizer  {
24         
25 public:
26         TaxEqualizer(string, int, string);
27         ~TaxEqualizer() {};
28         
29         string getEqualizedTaxFile()    {       return equalizedFile;   }
30         int getHighestLevel()                   {       return highestLevel;    }
31         
32         
33 private:
34         string equalizedFile, testTax, outputDir;
35         bool containsConfidence;
36         int cutoff, highestLevel;
37         map<string, int> seqLevels;  //maps name to level of taxonomy
38         
39         int getHighestLevel(ifstream&);  //scans taxonomy file to find taxonomy with highest level
40         void extendTaxonomy(string, string&, int);  //name, taxonomy, desired level
41         void truncateTaxonomy(string, string&, int);  //name, taxonomy, desired level
42         MothurOut* m;
43         
44 };
45
46 /**************************************************************************************************/
47
48
49 #endif
50
51