8 * Created by Sarah Westcott on 7/9/09.
9 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
17 /***********************************************************/
18 //This class was created using the algorythms described in the
19 // "At Least 1 in 20 16S rRNA Sequence Records Currently Held in the Public Repositories is Estimated To Contain Substantial Anomalies" paper
20 //by Kevin E. Ashelford 1, Nadia A. Chuzhanova 3, John C. Fry 1, Antonia J. Jones 2 and Andrew J. Weightman 1.
22 /***********************************************************/
24 class Pintail : public Chimera {
27 Pintail(string, string);
33 void setCons(string c) { consfile = c; }
34 void setQuantiles(string q) { quanfile = q; }
42 string fastafile, templateFile, consfile;
45 vector<linePair*> lines;
46 vector<linePair*> templateLines;
47 vector<Sequence*> querySeqs;
48 vector<Sequence*> templateSeqs;
50 vector<Sequence*> bestfit; //bestfit[0] matches queryseqs[0]...
52 vector< vector<float> > obsDistance; //obsDistance[0] is the vector of observed distances for queryseqs[0]...
53 vector< vector<float> > expectedDistance; //expectedDistance[0] is the vector of expected distances for queryseqs[0]...
54 vector<float> deviation; //deviation[0] is the percentage of mismatched pairs over the whole seq between querySeqs[0] and its best match.
55 vector< vector<int> > windowsForeachQuery; // windowsForeachQuery[0] is a vector containing the starting spot in queryseqs[0] aligned sequence for each window.
56 //this is needed so you can move by bases and not just spots in the alignment
58 vector<int> windowSizes; //windowSizes[0] = window size of querySeqs[0]
59 vector<int> windowSizesTemplate; //windowSizesTemplate[0] = window size of templateSeqs[0]
61 vector< map<int, int> > trimmed; //trimmed[0] = start and stop of trimmed sequences for querySeqs[0]
62 map<int, int>::iterator it;
64 vector< vector<float> > Qav; //Qav[0] is the vector of average variablility for queryseqs[0]...
65 vector<float> seqCoef; //seqCoef[0] is the coeff for queryseqs[0]...
66 vector<float> DE; //DE[0] is the deviaation for queryseqs[0]...
67 vector<float> probabilityProfile;
68 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...
69 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...
73 vector<float> readFreq();
74 vector<Sequence*> findPairs(int, int);
76 void createProcessesSpots();
77 void createProcessesPairs();
78 void createProcesses();
79 void createProcessesQuan();
83 /***********************************************************/