]> git.donarmstrong.com Git - mothur.git/blobdiff - sequence.hpp
added warning about merging with something above cutoff to cluster. working on chimeras
[mothur.git] / sequence.hpp
index 32063ef6f3daca1f4586abda0d02497da263933f..f6d7c869853a17808d8d894466f3d473b18c13d8 100644 (file)
@@ -8,10 +8,13 @@
  *  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;
 
-#include <string>
+#include "mothur.h"
 
 
 /**************************************************************************************************/
@@ -19,21 +22,44 @@ 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();
+       void reverseComplement();
+       
        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 getSequenceString(ifstream&);
+       string getCommentString(ifstream&);
        string name;
        string unaligned;
-       string pairwise;
        string aligned;
+       string pairwise;
+       int numBases;
+       int alignmentLength;
+       bool isAligned;
+       int longHomoPolymer;
+       int ambigBases;
+       int startPos, endPos;
 };
 
 /**************************************************************************************************/