X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=sequence.hpp;h=94d7d29b6117da80862e9fc8b3d0855c4adb8edd;hb=836150c0a3666899ad58426388f4999d6cf8829a;hp=37ca87cf019ead5dd230bb8226d09761e7d16880;hpb=526a868606faa50caf86e7399f7554c0335b39e5;p=mothur.git diff --git a/sequence.hpp b/sequence.hpp index 37ca87c..94d7d29 100644 --- a/sequence.hpp +++ b/sequence.hpp @@ -13,10 +13,9 @@ * to set and get these values for the other classes where they are needed. * * */ -using namespace std; #include "mothur.h" - +#include "mothurout.h" /**************************************************************************************************/ @@ -25,30 +24,56 @@ public: Sequence(); Sequence(string, string); Sequence(ifstream&); + 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(); - int getLength(); //the greater of the lengths of unaligned and aligned - int getUnalignLength(); + string getInlineSeq(); + int getNumBases(); + int getStartPos(); + int getEndPos(); + void padToPos(int); + void padFromPos(int); int getAlignLength(); + int getAmbigBases(); + void removeAmbigBases(); + int getLongHomoPolymer(); + bool getIsAligned(); void printSequence(ostream&); private: + MothurOut* m; + void initialize(); + string getSequenceString(ifstream&); + string getCommentString(ifstream&); + string getSequenceString(istringstream&); + string getCommentString(istringstream&); string name; string unaligned; string aligned; string pairwise; - int length; - int lengthAligned; + int numBases; + int alignmentLength; + bool isAligned; + int longHomoPolymer; + int ambigBases; + int startPos, endPos; }; /**************************************************************************************************/