[project @ 13]
[mussa.git] / flp.hh
1 //  This file is part of the Mussa source distribution.
2 //  http://mussa.caltech.edu/
3 //  Contact author: Tristan  De Buysscher, tristan@caltech.edu
4
5 // This program and all associated source code files are Copyright (C) 2005
6 // the California Institute of Technology, Pasadena, CA, 91125 USA.  It is
7 // under the GNU Public License; please see the included LICENSE.txt
8 // file for more information, or contact Tristan directly.
9
10
11 //                        ----------------------------------------
12 //                            ---------- flp.hh  -----------
13 //                        ----------------------------------------
14
15 #include "sequence.hh"
16
17
18 // FLP = Fixed Length Pairs (Data)
19 // vector of linked lists of the match type struct
20 class FLPs
21 {
22   private:
23     int window_size;
24     int hard_threshold;
25     int seq1_length, seq2_length, seq1_win_num, seq2_win_num;
26     string ana_type;
27
28
29     struct match
30     {
31       int index;
32       int score;
33     };
34
35
36
37
38   public:
39     FLPs();
40     void setup(string type, int win_size, int hard_thres, int len1, int len2);
41     inline void add(int seq1_i, int seq2_i, int a_score, int i2_offset);
42     void seqcomp(string seq1, string seq2, bool is_RC);
43   //bool FLPs::match_less(match *match1, match *match2);
44   //void FLPs::sort();
45     list<int> matches(int index);
46   //version with int threshold 
47     list<int> thres_matches(int index, int thres);
48     int win_num();
49     void file_save(string save_file_path);
50     void file_load(string file_path);
51
52     vector<list<match> > all_matches;
53 };