*
*/
+//DataStructure for a quality file.
+
#include "mothur.h"
#include "mothurout.h"
class QualityScores {
public:
QualityScores();
- QualityScores(ifstream&, int);
+ 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&);
};
/**************************************************************************************************/