]> git.donarmstrong.com Git - mothur.git/blob - sequence.hpp
created mothurOut class to handle logfiles
[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 #include "mothurout.h"
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         MothurOut* m;
51         void initialize();
52         string getSequenceString(ifstream&);
53         string getCommentString(ifstream&);
54         string name;
55         string unaligned;
56         string aligned;
57         string pairwise;
58         int numBases;
59         int alignmentLength;
60         bool isAligned;
61         int longHomoPolymer;
62         int ambigBases;
63         int startPos, endPos;
64 };
65
66 /**************************************************************************************************/
67
68 #endif