]> git.donarmstrong.com Git - mothur.git/blobdiff - sequence.hpp
working on chimera.perseus. made removeConfidences function smarter. Fixed bug in...
[mothur.git] / sequence.hpp
index 21b4c3874c9ccb1f5ab9eab31fe78fbd7f0a40c6..224ae5d7a7452172c3aa3be1e63906e0a876efe2 100644 (file)
@@ -14,6 +14,9 @@
  *
  */
 
+
+//Data Structure for a fasta file.
+
 #include "mothur.h"
 #include "mothurout.h"
 
@@ -25,6 +28,13 @@ public:
        Sequence(string, string);
        Sequence(ifstream&);
        Sequence(istringstream&);
+       Sequence(const Sequence& se) : name(se.name), unaligned(se.unaligned), aligned(se.aligned), pairwise(se.pairwise), numBases(se.numBases), startPos(se.startPos), endPos(se.endPos),
+                                                                       alignmentLength(se.alignmentLength), isAligned(se.isAligned), longHomoPolymer(se.longHomoPolymer), ambigBases(se.ambigBases) { m = MothurOut::getInstance(); }
+       
+       //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);
@@ -32,24 +42,26 @@ public:
        void setAligned(string);
        void setLength();
        void reverseComplement();
+       void trim(int);
        
        string convert2ints();
        string getName();
        string getAligned();
        string getPairwise();
        string getUnaligned();
+       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&);
        
-       int MPISend(int); //not working at the moment...
-       int MPIRecv(int); //not working at the moment...
-       
 private:
        MothurOut* m;
        void initialize();