]> git.donarmstrong.com Git - mothur.git/blob - qualityscores.h
testing 1.22.0
[mothur.git] / qualityscores.h
1 #ifndef QUALITYSCORES
2 #define QUALITYSCORES
3
4 /*
5  *  qualityscores.h
6  *  Mothur
7  *
8  *  Created by Pat Schloss on 7/12/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 //DataStructure for a quality file.
14
15
16 #include "mothur.h"
17 #include "mothurout.h"
18 #include "sequence.hpp"
19
20 /**************************************************************************************************/
21
22 class QualityScores {
23 public:
24         QualityScores();
25         QualityScores(ifstream&);
26         string getName();
27         
28         vector<int> getQualityScores() { return qScores; }
29         void printQScores(ofstream&);
30         void trimQScores(int, int);
31         void flipQScores();
32         bool stripQualThreshold(Sequence&, double);
33         bool stripQualRollingAverage(Sequence&, double);
34         bool stripQualWindowAverage(Sequence&, int, int, double);
35         bool cullQualAverage(Sequence&, double);
36         void updateQScoreErrorMap(map<char, vector<int> >&, string, int, int, int);
37         void updateForwardMap(vector<vector<int> >&, int, int, int);
38         void updateReverseMap(vector<vector<int> >&, int, int, int);
39         
40 private:
41         
42         double calculateAverage();
43         MothurOut* m;
44         vector<int> qScores;
45         
46         string seqName;
47         int seqLength;
48 };
49         
50 /**************************************************************************************************/
51
52 #endif