]> git.donarmstrong.com Git - mothur.git/blob - qualityscores.h
changed random forest output filename
[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         int getLength(){    return (int)qScores.size();  }
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     void setName(string n); 
40     void setScores(vector<int> qs) { qScores = qs; seqLength = qScores.size(); }
41     vector<int> getScores() { return qScores; }
42         
43 private:
44         
45         double calculateAverage();
46         MothurOut* m;
47         vector<int> qScores;
48         
49         string seqName;
50         int seqLength;
51     
52     string getSequenceName(ifstream&);
53 };
54         
55 /**************************************************************************************************/
56
57 #endif