]> git.donarmstrong.com Git - mothur.git/blobdiff - qualityscores.h
Revert to previous commit
[mothur.git] / qualityscores.h
diff --git a/qualityscores.h b/qualityscores.h
new file mode 100644 (file)
index 0000000..49034b8
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef QUALITYSCORES
+#define QUALITYSCORES
+
+/*
+ *  qualityscores.h
+ *  Mothur
+ *
+ *  Created by Pat Schloss on 7/12/10.
+ *  Copyright 2010 Schloss Lab. All rights reserved.
+ *
+ */
+
+//DataStructure for a quality file.
+
+
+#include "mothur.h"
+#include "mothurout.h"
+#include "sequence.hpp"
+
+/**************************************************************************************************/
+
+class QualityScores {
+public:
+       QualityScores();
+       QualityScores(ifstream&);
+       string getName();
+       
+       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);
+       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) { seqName = n; }
+    void setScores(vector<int> qs) { qScores = qs; seqLength = qScores.size(); }
+    
+       
+private:
+       
+       double calculateAverage();
+       MothurOut* m;
+       vector<int> qScores;
+       
+       string seqName;
+       int seqLength;
+};
+       
+/**************************************************************************************************/
+
+#endif