]> git.donarmstrong.com Git - mothur.git/blob - qualityscores.h
added oligos class. added check orient parameter to trim.flows, sffinfo, fastq.info...
[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(string n, vector<int> qs);
26         QualityScores(ifstream&);
27         string getName();
28         int getLength(){    return (int)qScores.size();  }
29         vector<int> getQualityScores() { return qScores; }
30         void printQScores(ofstream&);
31         void trimQScores(int, int);
32         void flipQScores();
33         bool stripQualThreshold(Sequence&, double);
34         bool stripQualRollingAverage(Sequence&, double, bool);
35         bool stripQualWindowAverage(Sequence&, int, int, double, bool);
36         bool cullQualAverage(Sequence&, double, bool);
37         void updateQScoreErrorMap(map<char, vector<int> >&, string, int, int, int);
38         void updateForwardMap(vector<vector<int> >&, int, int, int);
39         void updateReverseMap(vector<vector<int> >&, int, int, int);
40     void setName(string n); 
41     void setScores(vector<int> qs) { qScores = qs; seqLength = qScores.size(); }
42     vector<int> getScores() { return qScores; }
43         
44 private:
45         
46         double calculateAverage(bool);
47         MothurOut* m;
48         vector<int> qScores;
49         
50         string seqName;
51         int seqLength;
52     
53     string getSequenceName(ifstream&);
54 };
55         
56 /**************************************************************************************************/
57
58 #endif