]> git.donarmstrong.com Git - mothur.git/blob - pintail.h
checking in chimera files in progress after move to michigan
[mothur.git] / pintail.h
1 #ifndef PINTAIL_H
2 #define PINTAIL_H
3
4 /*
5  *  pintail.h
6  *  Mothur
7  *
8  *  Created by Sarah Westcott on 7/9/09.
9  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10  *
11  */
12
13 #include "chimera.h"
14 #include "dist.h"
15 #include "decalc.h"
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 Pintail : public Chimera {
24         
25         public:
26                 Pintail(string, string);        
27                 ~Pintail();
28                 
29                 void getChimeras();
30                 void print(ostream&);
31                 
32                 void setCons(string c)          { consfile = c;  }
33                 void setQuantiles(string q) { quanfile = q;  }
34                 
35                 
36         private:
37         
38                 Dist* distcalculator;
39                 DeCalculator* decalc;
40                 int iters;
41                 string fastafile, templateFile, consfile;
42                 
43                 
44                 vector<linePair*> lines;
45                 vector<linePair*> templateLines;
46                 vector<Sequence*> querySeqs;
47                 vector<Sequence*> templateSeqs;
48                 
49                 vector<Sequence*> bestfit;  //bestfit[0] matches queryseqs[0]...
50                 
51                 vector< vector<float> > obsDistance;  //obsDistance[0] is the vector of observed distances for queryseqs[0]... 
52                 vector< vector<float> > expectedDistance;  //expectedDistance[0] is the vector of expected distances for queryseqs[0]... 
53                 vector<float> deviation;  //deviation[0] is the percentage of mismatched pairs over the whole seq between querySeqs[0] and its best match.
54                 vector< vector<int> > windowsForeachQuery;  // windowsForeachQuery[0] is a vector containing the starting spot in queryseqs[0] aligned sequence for each window.
55                                                                                 //this is needed so you can move by bases and not just spots in the alignment
56                                                                                 
57                 vector<int> windowSizes;                        //windowSizes[0] = window size of querySeqs[0]
58                 vector<int> windowSizesTemplate;    //windowSizesTemplate[0] = window size of templateSeqs[0]
59                 
60                 vector< map<int, int> > trimmed;    //trimmed[0] = start and stop of trimmed sequences for querySeqs[0]
61                 map<int, int>::iterator it;
62                 
63                 vector< vector<float> > Qav;    //Qav[0] is the vector of average variablility for queryseqs[0]... 
64                 vector<float>  seqCoef;                         //seqCoef[0] is the coeff for queryseqs[0]...
65                 vector<float> DE;                                       //DE[0] is the deviaation for queryseqs[0]...
66                 vector<float> probabilityProfile;
67                 vector< vector<float> > quantiles;  //quantiles[0] is the vector of deviations with ceiling score of 1, quantiles[1] is the vector of deviations with ceiling score of 2...
68                 vector< vector<quanMember> > quantilesMembers;  //quantiles[0] is the vector of deviations with ceiling score of 1, quantiles[1] is the vector of deviations with ceiling score of 2...
69                 vector< set<int> > h;
70                 
71                 
72                 vector<float> readFreq();
73                 vector<Sequence*> findPairs(int, int);
74                         
75                 void createProcessesSpots();
76                 void createProcessesPairs();
77                 void createProcesses();
78                 void createProcessesQuan();
79                 
80 };
81
82 /***********************************************************/
83
84 #endif
85