[project @ 4]
[mussa.git] / sequence.hh
1 //                        ----------------------------------------
2 //                           ---------- sequence.hh -----------
3 //                        ----------------------------------------
4
5
6 #include <iostream>
7 #include <list>
8 #include <vector>
9 #include <string>
10 #include <fstream>
11 #include <stdlib.h>
12 #include <algorithm>
13
14 // Sequence data class
15
16 using namespace std;
17
18 struct annot
19 {
20   int start, end;
21   string name, type;
22 };
23
24 class Sequence
25 {
26   friend class ConnView;
27   friend class SeqView;
28   private:
29     string sequence;
30     int length;
31     string header;
32     string species;
33     int species_num; 
34
35
36     list<annot> annots;
37
38
39
40
41   public:
42     Sequence();
43     void load_fasta(string file_path, int seq_num, 
44                     int start_index, int end_index);
45     void load_annot(string file_path);
46     string seq();
47     const char * c_seq();
48     string rev_comp();
49     int len();
50     string hdr();
51     void set_seq(string a_seq);
52     list<int> find_motif(string a_motif);
53   //  string species();
54     void clear();
55     void save(fstream &save_file);
56     void load_museq(string load_file_path, int seq_num); 
57 };