8 * Created by Sarah Westcott on 7/9/09.
9 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
16 //This class was created using the algorythms described in the
17 // "At Least 1 in 20 16S rRNA Sequence Records Currently Held in the Public Repositories is Estimated To Contain Substantial Anomalies" paper
18 //by Kevin E. Ashelford 1, Nadia A. Chuzhanova 3, John C. Fry 1, Antonia J. Jones 2 and Andrew J. Weightman 1.
20 /***********************************************************/
22 class Pintail : public Chimera {
37 linePair(int i, int j) : start(i), end(j) {}
44 vector<linePair*> lines;
45 vector<Sequence*> querySeqs;
46 vector<Sequence*> templateSeqs;
48 map<Sequence*, Sequence*> bestfit; //maps a query sequence to its most similiar sequence in the template
49 map<Sequence*, Sequence*>::iterator itBest;
51 map<Sequence*, vector<float> > obsDistance; //maps a query sequence to its observed distance at each window
52 map<Sequence*, vector<float> > expectedDistance; //maps a query sequence to its expected distance at each window
53 map<Sequence*, vector<float> >::iterator itObsDist;
54 map<Sequence*, vector<float> >::iterator itExpDist;
56 vector<float> averageProbability; //Qav
57 map<Sequence*, float> seqCoef; //maps a sequence to its coefficient
58 map<Sequence*, float> DE; //maps a sequence to its deviation
59 map<Sequence*, float>::iterator itCoef;
61 vector<Sequence*> readSeqs(string);
62 vector<float> findQav(vector<float>);
63 vector<float> calcFreq(vector<Sequence*>);
64 map<Sequence*, float> getCoef(vector<float>);
66 void findPairs(int, int);
67 void calcObserved(int, int);
68 void calcExpected(int, int);
69 void calcDE(int, int);
71 void createProcessesPairs();
72 void createProcessesObserved();
73 void createProcessesExpected();
74 void createProcessesDE();
78 /***********************************************************/