X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sequence.hpp;h=929ca781ba9906c736bc83e2a79b556b583651f2;hb=dc874a77f24b3808775e2ce7e39595c647a07f82;hp=e094fb520f7ad26c96cbcfa7226e194bd883f690;hpb=bfbc55964f1977da72c2cea984288a427d370a59;p=mothur.git diff --git a/sequence.hpp b/sequence.hpp index e094fb5..929ca78 100644 --- a/sequence.hpp +++ b/sequence.hpp @@ -8,6 +8,10 @@ * Created by Pat Schloss on 12/15/08. * Copyright 2008 Patrick D. Schloss. All rights reserved. * + * A sequence object has three components: i) an accession number / name, ii) the unaligned primary sequence, iii) a + * pairwise aligned sequence, and iv) a sequence that is aligned to a reference alignment. This class has methods + * to set and get these values for the other classes where they are needed. * + * */ using namespace std; @@ -19,21 +23,41 @@ using namespace std; class Sequence { public: Sequence(); + Sequence(string, string); Sequence(ifstream&); + void setName(string); void setUnaligned(string); void setPairwise(string); void setAligned(string); + void setLength(); + string convert2ints(); - string getSeqName(); + string getName(); string getAligned(); string getPairwise(); string getUnaligned(); + int getNumBases(); + int getStartPos(); + int getEndPos(); + int getAlignLength(); + int getAmbigBases(); + int getLongHomoPolymer(); + bool getIsAligned(); + void printSequence(ostream&); + private: + void initialize(); string name; string unaligned; - string pairwise; string aligned; + string pairwise; + int numBases; + int alignmentLength; + bool isAligned; + int longHomoPolymer; + int ambigBases; + int startPos, endPos; }; /**************************************************************************************************/