]> git.donarmstrong.com Git - mothur.git/blob - taxonomyequalizer.h
6308d7168e72651f349ab3bf0a28942949063f62
[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
16 //reads in taxonomy file and makes all the taxonomies the same length 
17 //by appending the last taxon to a given taxonomy as many times as needed to 
18 //make it as long as the longest taxonomy in the file 
19
20 /**************************************************************************************************/
21
22 class TaxEqualizer  {
23         
24 public:
25         TaxEqualizer(string, int);
26         ~TaxEqualizer() {};
27         
28         string getEqualizedTaxFile()    {  return equalizedFile;        }
29         
30         
31 private:
32         string equalizedFile, testTax;
33         bool containsConfidence;
34         int cutoff;
35         map<string, int> seqLevels;  //maps name to level of taxonomy
36         
37         int getHighestLevel(ifstream&);  //scans taxonomy file to find taxonomy with highest level
38         void extendTaxonomy(string, string&, int);  //name, taxonomy, desired level
39         void truncateTaxonomy(string, string&, int);  //name, taxonomy, desired level
40         void removeConfidences(string&);  //removes the confidence limits on the taxon 
41
42         
43 };
44
45 /**************************************************************************************************/
46
47
48 #endif
49
50