]> git.donarmstrong.com Git - mothur.git/blob - sequence.hpp
pat's edits of screen.seqs and summary.seqs
[mothur.git] / sequence.hpp
1 #ifndef SEQUENCE_H
2 #define SEQUENCE_H
3
4 /*
5  *  sequence.h
6  *  
7  *
8  *  Created by Pat Schloss on 12/15/08.
9  *  Copyright 2008 Patrick D. Schloss. All rights reserved.
10  *
11  *      A sequence object has three components: i) an accession number / name, ii) the unaligned primary sequence, iii) a
12  *      pairwise aligned sequence, and iv) a sequence that is aligned to a reference alignment.  This class has methods
13  *      to set and get these values for the other classes where they are needed.  *
14  *
15  */
16 using namespace std;
17
18 #include "mothur.h"
19
20
21 /**************************************************************************************************/
22
23 class Sequence {
24 public:
25         Sequence();
26         Sequence(string, string);
27         Sequence(ifstream&);
28         
29         void setName(string);
30         void setUnaligned(string);
31         void setPairwise(string);
32         void setAligned(string);
33         void setLength();
34         void reverseComplement();
35         
36         string convert2ints();
37         string getName();
38         string getAligned();
39         string getPairwise();
40         string getUnaligned();
41         int getNumBases();
42         int getStartPos();
43         int getEndPos();
44         int getAlignLength();
45         int getAmbigBases();
46         int getLongHomoPolymer();
47         bool getIsAligned();
48         void printSequence(ostream&);
49         
50 private:
51         void initialize();
52         string name;
53         string unaligned;
54         string aligned;
55         string pairwise;
56         int numBases;
57         int alignmentLength;
58         bool isAligned;
59         int longHomoPolymer;
60         int ambigBases;
61         int startPos, endPos;
62 };
63
64 /**************************************************************************************************/
65
66 #endif