]> git.donarmstrong.com Git - mothur.git/blobdiff - qualityscores.h
working on pam
[mothur.git] / qualityscores.h
index 710200a8db096239d873083c9fa7fce7a9cbc6f8..a802636fd364071ab15aa84c148ebb38fead14b4 100644 (file)
@@ -10,6 +10,8 @@
  *
  */
 
+//DataStructure for a quality file.
+
 
 #include "mothur.h"
 #include "mothurout.h"
@@ -22,21 +24,32 @@ public:
        QualityScores();
        QualityScores(ifstream&);
        string getName();
+       int getLength(){    return (int)qScores.size();  }
+       vector<int> getQualityScores() { return qScores; }
        void printQScores(ofstream&);
        void trimQScores(int, int);
        void flipQScores();
        bool stripQualThreshold(Sequence&, double);
-       bool stripQualRollingAverage(Sequence&, double);
-       bool stripQualWindowAverage(Sequence&, int, int, double);
-       bool cullQualAverage(Sequence&, double);
+       bool stripQualRollingAverage(Sequence&, double, bool);
+       bool stripQualWindowAverage(Sequence&, int, int, double, bool);
+       bool cullQualAverage(Sequence&, double, bool);
+       void updateQScoreErrorMap(map<char, vector<int> >&, string, int, int, int);
+       void updateForwardMap(vector<vector<int> >&, int, int, int);
+       void updateReverseMap(vector<vector<int> >&, int, int, int);
+    void setName(string n); 
+    void setScores(vector<int> qs) { qScores = qs; seqLength = qScores.size(); }
+    vector<int> getScores() { return qScores; }
+       
 private:
        
-       double calculateAverage();
+       double calculateAverage(bool);
        MothurOut* m;
        vector<int> qScores;
        
        string seqName;
        int seqLength;
+    
+    string getSequenceName(ifstream&);
 };
        
 /**************************************************************************************************/