]> git.donarmstrong.com Git - mothur.git/blobdiff - sequence.hpp
working on pam
[mothur.git] / sequence.hpp
index 904e25aeb7a5b4d3476df576217d12820f95f358..c49899411f2dd7919d96ce9b9840c30b2b0dfcac 100644 (file)
  *     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,6 +27,12 @@ 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);
@@ -32,27 +40,43 @@ public:
        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;
        string pairwise;
+    string comment;
        int numBases;
        int alignmentLength;
        bool isAligned;