]> git.donarmstrong.com Git - mothur.git/blobdiff - pintail.h
last changes before move
[mothur.git] / pintail.h
index 7c0f81bca5659a0f3fa56357dd70fe5498570334..ddfba85efdf4d3d424443ed1fba1ecee6ae101eb 100644 (file)
--- a/pintail.h
+++ b/pintail.h
@@ -12,6 +12,7 @@
 
 #include "chimera.h"
 #include "dist.h"
+#include "decalc.h"
 
 //This class was created using the algorythms described in the 
 // "At Least 1 in 20 16S rRNA Sequence Records Currently Held in the Public Repositories is Estimated To Contain Substantial Anomalies" paper 
 class Pintail : public Chimera {
        
        public:
-               Pintail(string);        
+               Pintail(string, string);        
                ~Pintail();
                
                void getChimeras();
                void print(ostream&);
                
+               void setCons(string c)          { consfile = c;  }
+               void setQuantiles(string q) { quanfile = q;  }
+               
                
        private:
        
@@ -35,43 +39,51 @@ class Pintail : public Chimera {
                        int start;
                        int end;
                        linePair(int i, int j) : start(i), end(j) {}
+                       linePair(){}
                };
 
-       
-               Dist* distCalculator;
-               string fastafile;
+               Dist* distcalculator;
+               DeCalculator* decalc;
                int iters;
+               string fastafile, templateFile, consfile, quanfile;
+               
+               
                vector<linePair*> lines;
+               vector<linePair*> templateLines;
                vector<Sequence*> querySeqs;
                vector<Sequence*> templateSeqs;
                
-               map<Sequence*, Sequence*> bestfit;  //maps a query sequence to its most similiar sequence in the template
-               map<Sequence*, Sequence*>::iterator itBest;
+               vector<Sequence*> bestfit;  //bestfit[0] matches queryseqs[0]...
                
-               map<Sequence*, vector<float> > obsDistance;  //maps a query sequence to its observed distance at each window
-               map<Sequence*, vector<float> > expectedDistance;  //maps a query sequence to its expected distance at each window
-               map<Sequence*, vector<float> >::iterator itObsDist;
-               map<Sequence*, vector<float> >::iterator itExpDist;
+               vector< vector<float> > obsDistance;  //obsDistance[0] is the vector of observed distances for queryseqs[0]... 
+               vector< vector<float> > expectedDistance;  //expectedDistance[0] is the vector of expected distances for queryseqs[0]... 
+               vector<float> deviation;  //deviation[0] is the percentage of mismatched pairs over the whole seq between querySeqs[0] and its best match.
+               vector< vector<int> > windowsForeachQuery;  // windowsForeachQuery[0] is a vector containing the starting spot in queryseqs[0] aligned sequence for each window.
+                                                                               //this is needed so you can move by bases and not just spots in the alignment
+                                                                               
+               vector<int> windowSizes;                        //windowSizes[0] = window size of querySeqs[0]
+               vector<int> windowSizesTemplate;    //windowSizesTemplate[0] = window size of templateSeqs[0]
                
-               vector<float> averageProbability;                       //Qav
-               map<Sequence*, float> seqCoef;                          //maps a sequence to its coefficient
-               map<Sequence*, float> DE;                                       //maps a sequence to its deviation
-               map<Sequence*, float>::iterator itCoef; 
+               vector< map<int, int> > trimmed;    //trimmed[0] = start and stop of trimmed sequences for querySeqs[0]
+               map<int, int>::iterator it;
                
-               vector<Sequence*> readSeqs(string);
-               vector<float> findQav(vector<float>);
-               vector<float> calcFreq(vector<Sequence*>);
-               map<Sequence*, float> getCoef(vector<float>);
+               vector< vector<float> > Qav;    //Qav[0] is the vector of average variablility for queryseqs[0]... 
+               vector<float>  seqCoef;                         //seqCoef[0] is the coeff for queryseqs[0]...
+               vector<float> DE;                                       //DE[0] is the deviaation for queryseqs[0]...
+               vector<float> probabilityProfile;
+               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...
+               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...
+               vector< set<int> > h;
                
-               void findPairs(int, int);
-               void calcObserved(int, int);
-               void calcExpected(int, int);
-               void calcDE(int, int);
-       
+               
+               vector<float> readFreq();
+               vector< vector<float> > readQuantiles();
+               vector<Sequence*> findPairs(int, int);
+                       
+               void createProcessesSpots();
                void createProcessesPairs();
-               void createProcessesObserved();
-               void createProcessesExpected();
-               void createProcessesDE();
+               void createProcesses();
+               void createProcessesQuan();
                
 };