]> git.donarmstrong.com Git - mothur.git/blob - sequence.hpp
added MPI code, broke up chimera.seqs into 5 separated commands, added parse.sff...
[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         Sequence(istringstream&);
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         int MPISend(int); //not working at the moment...
51         int MPIRecv(int); //not working at the moment...
52         
53 private:
54         MothurOut* m;
55         void initialize();
56         string getSequenceString(ifstream&);
57         string getCommentString(ifstream&);
58         string getSequenceString(istringstream&);
59         string getCommentString(istringstream&);
60         string name;
61         string unaligned;
62         string aligned;
63         string pairwise;
64         int numBases;
65         int alignmentLength;
66         bool isAligned;
67         int longHomoPolymer;
68         int ambigBases;
69         int startPos, endPos;
70 };
71
72 /**************************************************************************************************/
73
74 #endif