]> git.donarmstrong.com Git - mothur.git/blob - sequence.hpp
fixed some bugs
[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
17 #include "mothur.h"
18
19
20 /**************************************************************************************************/
21
22 class Sequence {
23 public:
24         Sequence();
25         Sequence(string, string);
26         Sequence(ifstream&);
27         
28         void setName(string);
29         void setUnaligned(string);
30         void setPairwise(string);
31         void setAligned(string);
32         void setLength();
33         void reverseComplement();
34         
35         string convert2ints();
36         string getName();
37         string getAligned();
38         string getPairwise();
39         string getUnaligned();
40         int getNumBases();
41         int getStartPos();
42         int getEndPos();
43         int getAlignLength();
44         int getAmbigBases();
45         int getLongHomoPolymer();
46         bool getIsAligned();
47         void printSequence(ostream&);
48         
49 private:
50         void initialize();
51         string name;
52         string unaligned;
53         string aligned;
54         string pairwise;
55         int numBases;
56         int alignmentLength;
57         bool isAligned;
58         int longHomoPolymer;
59         int ambigBases;
60         int startPos, endPos;
61 };
62
63 /**************************************************************************************************/
64
65 #endif