]> git.donarmstrong.com Git - mothur.git/blob - sequence.hpp
modified sequence class to read fasta files with comments. this required modification...
[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 getSequenceString(ifstream&);
52         string getCommentString(ifstream&);
53         string name;
54         string unaligned;
55         string aligned;
56         string pairwise;
57         int numBases;
58         int alignmentLength;
59         bool isAligned;
60         int longHomoPolymer;
61         int ambigBases;
62         int startPos, endPos;
63 };
64
65 /**************************************************************************************************/
66
67 #endif