X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=qualityscores.h;fp=qualityscores.h;h=49034b8ecb2a2b937901c9cfda132c00bcd5c4c4;hb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;hp=0000000000000000000000000000000000000000;hpb=1b73ff67c83892a025e597dabd9df6fe7b58206a;p=mothur.git diff --git a/qualityscores.h b/qualityscores.h new file mode 100644 index 0000000..49034b8 --- /dev/null +++ b/qualityscores.h @@ -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 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 >&, string, int, int, int); + void updateForwardMap(vector >&, int, int, int); + void updateReverseMap(vector >&, int, int, int); + void setName(string n) { seqName = n; } + void setScores(vector qs) { qScores = qs; seqLength = qScores.size(); } + + +private: + + double calculateAverage(); + MothurOut* m; + vector qScores; + + string seqName; + int seqLength; +}; + +/**************************************************************************************************/ + +#endif