]> git.donarmstrong.com Git - mothur.git/blob - decalc.h
4ce45bf751915dd9e077ce478ae912358e789900
[mothur.git] / decalc.h
1 #ifndef DECALC_H
2 #define DECALC_H
3 /*
4  *  decalc.h
5  *  Mothur
6  *
7  *  Created by Sarah Westcott on 7/22/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12 #include "mothur.h"
13 #include "sequence.hpp"
14
15 /***********************************************************************/
16
17 //This class was created using the algorythms described in the 
18 // "At Least 1 in 20 16S rRNA Sequence Records Currently Held in the Public Repositories is Estimated To Contain Substantial Anomalies" paper 
19 //by Kevin E. Ashelford 1, Nadia A. Chuzhanova 3, John C. Fry 1, Antonia J. Jones 2 and Andrew J. Weightman 1.
20
21 /***********************************************************************/
22
23 class DeCalculator {
24
25         public:
26                 
27                 DeCalculator() {};
28                 ~DeCalculator() {};
29                 
30                 set<int> getPos() {  return h;  }
31                 void setMask(string); 
32                 void setAlignmentLength(int l) {  alignLength = l;  }
33                 void runMask(Sequence*);
34                 void trimSeqs(Sequence*, Sequence*, map<int, int>&);
35                 void removeObviousOutliers(vector< vector<float> >&);
36                 vector<float> calcFreq(vector<Sequence*>, string);
37                 vector<int> findWindows(Sequence*, int, int, int&, int);
38                 vector<float> calcObserved(Sequence*, Sequence*, vector<int>, int);
39                 vector<float>  calcExpected(vector<float>, float);
40                 vector<float>  findQav(vector<int>, int, vector<float>);  
41                 float calcDE(vector<float>, vector<float>);
42                 float calcDist(Sequence*, Sequence*, int, int);
43                 float getCoef(vector<float>, vector<float>);
44                 vector< vector<float> > getQuantiles(vector<Sequence*>, vector<int>, int, vector<float>, int, int, int);
45                 
46         private:
47                 float findAverage(vector<float> myVector);
48                 string seqMask;
49                 set<int> h;
50                 int alignLength;
51
52 };
53
54 /***********************************************************************/
55
56 #endif