]> git.donarmstrong.com Git - mothur.git/blob - alignedsimilarity.h
finished with ccode, returned bellerophon to last save before move, cleaned up pintai...
[mothur.git] / alignedsimilarity.h
1 #ifndef ALIGNSIM_H
2 #define ALIGNSIM_H
3
4 /*
5  *  alignedsimilarity.h
6  *  Mothur
7  *
8  *  Created by westcott on 8/18/09.
9  *  Copyright 2009 Schloss Lab. All rights reserved.
10  *
11  */
12
13
14 #include "chimera.h"
15 #include "dist.h"
16
17 //This class was created using the algorythms described in the 
18 //"Evaluation of Nearest Neighbor Methods for Detection of Chimeric Small-Subunit rRna Sequences" paper 
19 //by J.F. Robison-Cox 1, M.M. Bateson 2 and D.M. Ward 2
20
21
22 /***********************************************************/
23
24 class AlignSim : public Chimera {
25         
26         public:
27                 AlignSim(string, string);       
28                 ~AlignSim();
29                 
30                 void getChimeras();
31                 void print(ostream&);
32                 
33                 void setCons(string){};
34                 void setQuantiles(string q) { quanfile = q; };
35                 
36                 
37         private:
38                 
39                 Dist* distCalc;
40                 vector<linePair*> lines;
41                 vector<linePair*> templateLines;
42                 
43                 vector<Sequence*> querySeqs;
44                 vector<Sequence*> templateSeqs;
45                 
46                 vector< vector<sim> > IS;  //IS[0] is the vector os sim values for each window for querySeqs[0]
47                 vector< vector<sim> > templateIS;  //templateIS[0] is the vector os sim values for each window for templateSeqs[0]
48                 vector<int> windowBreak;
49                 
50                 string fastafile, templateFile;
51                 int iters;
52                 
53                 vector< vector<sim> > findIS(int, int, vector<Sequence*>);
54                 vector<Sequence*> findClosestSides(Sequence*, int, vector<int>&, int);
55                 int findNumMatchedBases(Sequence, Sequence);
56                 vector<int> findWindows();
57                 
58                 vector< vector<float> > quantile;
59                 
60                 vector< vector<sim> > createProcessesIS(vector<Sequence*>, vector<linePair*>);
61                 
62 };
63
64 /***********************************************************/
65
66 #endif
67