X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=pintail.h;h=797c99e1543ace2df4a142015a17fe56eaf4f033;hb=3abb236c602eb168ee112f080b563ebe2c705029;hp=7c0f81bca5659a0f3fa56357dd70fe5498570334;hpb=0f297d3c211acbdfd4d941ef193a6702c5046dd1;p=mothur.git diff --git a/pintail.h b/pintail.h index 7c0f81b..797c99e 100644 --- a/pintail.h +++ b/pintail.h @@ -22,12 +22,14 @@ class Pintail : public Chimera { public: - Pintail(string); + Pintail(string, string); ~Pintail(); void getChimeras(); void print(ostream&); + void setCons(string c) { consfile = c; } + private: @@ -37,41 +39,47 @@ class Pintail : public Chimera { linePair(int i, int j) : start(i), end(j) {} }; - - Dist* distCalculator; - string fastafile; + Dist* distcalculator; int iters; + string fastafile, templateFile, consfile; vector lines; vector querySeqs; vector templateSeqs; - map bestfit; //maps a query sequence to its most similiar sequence in the template - map::iterator itBest; + vector bestfit; //bestfit[0] matches queryseqs[0]... - map > obsDistance; //maps a query sequence to its observed distance at each window - map > expectedDistance; //maps a query sequence to its expected distance at each window - map >::iterator itObsDist; - map >::iterator itExpDist; + vector< vector > obsDistance; //obsDistance[0] is the vector of observed distances for queryseqs[0]... + vector< vector > expectedDistance; //expectedDistance[0] is the vector of expected distances for queryseqs[0]... + vector deviation; //deviation[0] is the percentage of mismatched pairs over the whole seq between querySeqs[0] and its best match. + vector< vector > windows; // windows[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< map > trim; //trim[0] is the start and end position of trimmed querySeqs[0]. Used to find the variability over each sequence window. + + vector windowSizes; //windowSizes[0] = window size of querySeqs[0] - vector averageProbability; //Qav - map seqCoef; //maps a sequence to its coefficient - map DE; //maps a sequence to its deviation - map::iterator itCoef; + vector< vector > Qav; //Qav[0] is the vector of average variablility for queryseqs[0]... + vector seqCoef; //seqCoef[0] is the coeff for queryseqs[0]... + vector DE; //DE[0] is the deviaation for queryseqs[0]... + vector probabilityProfile; vector readSeqs(string); - vector findQav(vector); + void trimSeqs(Sequence*, Sequence&, int); + vector readFreq(); + vector< vector > findQav(int, int); vector calcFreq(vector); - map getCoef(vector); + vector getCoef(int, int); - void findPairs(int, int); - void calcObserved(int, int); - void calcExpected(int, int); - void calcDE(int, int); + vector findPairs(int, int); + vector< vector > findWindows(int, int); + vector< vector > calcObserved(int, int); + vector< vector > calcExpected(int, int); + vector calcDE(int, int); + vector calcDist(int, int); - void createProcessesPairs(); - void createProcessesObserved(); - void createProcessesExpected(); - void createProcessesDE(); + void createProcessesSpots(); + void createProcesses(); + + };