X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=sequence.hpp;h=ad3a4b40c238c4260d36f7afea027b903539c8a0;hp=929ca781ba9906c736bc83e2a79b556b583651f2;hb=615301e57c25e241356a9c2380648d117709458d;hpb=5b7ac70116137b52dd7884b76c5bca660a5fea38 diff --git a/sequence.hpp b/sequence.hpp index 929ca78..ad3a4b4 100644 --- a/sequence.hpp +++ b/sequence.hpp @@ -13,10 +13,12 @@ * to set and get these values for the other classes where they are needed. * * */ -using namespace std; -#include "mothur.h" +//Data Structure for a fasta file. + +#include "mothur.h" +#include "mothurout.h" /**************************************************************************************************/ @@ -25,29 +27,51 @@ public: Sequence(); Sequence(string, string); Sequence(ifstream&); + Sequence(ifstream&, string&, bool); + Sequence(istringstream&); + //these constructors just set the unaligned string to save space + Sequence(string, string, string); + Sequence(ifstream&, string); + Sequence(istringstream&, string); void setName(string); void setUnaligned(string); void setPairwise(string); void setAligned(string); void setLength(); + void reverseComplement(); + void trim(int); string convert2ints(); string getName(); string getAligned(); string getPairwise(); string getUnaligned(); + string getInlineSeq(); + int getNumNs(); int getNumBases(); int getStartPos(); int getEndPos(); + void padToPos(int); + void padFromPos(int); + int filterToPos(int); //any character before the pos is changed to . and aligned and unaligned strings changed + int filterFromPos(int); //any character after the pos is changed to . and aligned and unaligned strings changed int getAlignLength(); int getAmbigBases(); + void removeAmbigBases(); int getLongHomoPolymer(); bool getIsAligned(); void printSequence(ostream&); private: + MothurOut* m; void initialize(); + string getSequenceString(ifstream&, int&); + string getCommentString(ifstream&); + string getSequenceString(istringstream&, int&); + string getCommentString(istringstream&); + string getSequenceName(ifstream&); + string getSequenceName(istringstream&); string name; string unaligned; string aligned;