7 * Created by Sarah Westcott on 7/22/09.
8 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
13 #include "sequence.hpp"
15 /***********************************************************************/
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.
21 /***********************************************************************/
23 //this structure is necessary to determine the sequence that contributed to the outliers when we remove them
24 //this way we can remove all scores that are contributed by outlier sequences.
29 quanMember (float s, int m, int n) : score(s), member1(m), member2(n) {}
34 //********************************************************************************************************************
42 set<int> getPos() { return h; }
44 void setAlignmentLength(int l) { alignLength = l; }
45 void runMask(Sequence*);
46 void trimSeqs(Sequence*, Sequence*, map<int, int>&);
47 void removeObviousOutliers(vector< vector<quanMember> >&, int);
48 vector<float> calcFreq(vector<Sequence*>, string);
49 vector<int> findWindows(Sequence*, int, int, int&, int);
50 vector<float> calcObserved(Sequence*, Sequence*, vector<int>, int);
51 vector<float> calcExpected(vector<float>, float);
52 vector<float> findQav(vector<int>, int, vector<float>);
53 float calcDE(vector<float>, vector<float>);
54 float calcDist(Sequence*, Sequence*, int, int);
55 float getCoef(vector<float>, vector<float>);
56 vector< vector<quanMember> > getQuantiles(vector<Sequence*>, vector<int>, int, vector<float>, int, int, int);
58 vector<int> returnObviousOutliers(vector< vector<quanMember> >, int);
60 map<int, int> getMaskMap() { return maskMap; }
63 //vector<quanMember> sortContrib(map<quanMember*, float>); //used by mallard
64 float findAverage(vector<float>);
65 //int findLargestContrib(vector<int>);
66 //void removeContrib(int, vector<quanMember>&);
70 map<int, int> maskMap;
74 /***********************************************************************/