[project @ 13]
[mussa.git] / mussa_nway.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 //                         ----------  mussa_nway.hh  -----------
13 //                        ----------------------------------------
14
15 #include "flp.hh"
16
17
18 class Nway_Paths
19 {
20   friend class ConnView;
21   friend class SeqView;
22   private:
23     int species_num;
24     int threshold;
25     int win_size;
26     int soft_thres;
27
28     double ent_thres;
29     vector<char *> c_sequences;
30
31     list<vector<int> > pathz;
32     list<vector<int> > refined_pathz;
33
34
35
36   public:
37     Nway_Paths();
38     void setup(int sp_num, int w, int t);
39     void setup_ent(double new_entropy_thres, vector<string> some_Seqs);
40     void set_soft_thres(int soft_thres);
41
42     void radiate_path_search(vector<vector<FLPs> > all_comparisons);
43     void trans_path_search(vector<vector<FLPs> > all_comparisons);
44     void entropy_path_search(vector<vector<FLPs> > all_comparisons);
45     double path_entropy(vector<int> path);
46
47   // old recursive transitive nway ... has issues checking all links?
48     void find_paths_r(vector<vector<FLPs> > all_comparisons);
49     void path_search(vector<vector<FLPs> > all_comparisons, vector<int> path, int depth);
50
51     void simple_refine();
52     void save(string save_file_path);
53     string load(string load_file_path);
54     void add_path(vector<int> loaded_path);
55     int seq_num();
56
57     void find_paths(vector<vector<FLPs> > all_comparisons);
58     void refine();
59
60     void save_old(string save_file_path);
61     void print();
62 };