3 // This file is part of the Mussa source distribution.
4 // http://mussa.caltech.edu/
5 // Contact author: Tristan De Buysscher, tristan@caltech.edu
7 // This program and all associated source code files are Copyright (C) 2005
8 // the California Institute of Technology, Pasadena, CA, 91125 USA. It is
9 // under the GNU Public License; please see the included LICENSE.txt
10 // file for more information, or contact Tristan directly.
13 // ----------------------------------------
14 // ---------- mussa_nway.hh -----------
15 // ----------------------------------------
21 #include "alg/flp.hpp"
22 #include "alg/conserved_path.hpp"
26 friend class ConnView;
34 std::vector<char *> c_sequences; //used by entropy_path_search
38 //! setup an nway comparison, initialize # of species, window size,
40 void setup(int w, int t);
41 void setup_ent(double new_entropy_thres, std::vector<std::string> some_Seqs);
42 void set_soft_thres(int soft_thres);
44 void radiate_path_search(std::vector<std::vector<FLPs> > all_comparisons);
45 void trans_path_search(std::vector<std::vector<FLPs> > all_comparisons);
46 void entropy_path_search(std::vector<std::vector<FLPs> > all_comparisons);
47 double path_entropy(std::vector<int> path);
49 // old recursive transitive nway ... has issues checking all links?
50 void find_paths_r(std::vector<std::vector<FLPs> > all_comparisons);
51 void path_search(std::vector<std::vector<FLPs> > all_comparisons, ConservedPath path, int depth);
54 void save(std::string save_file_path);
55 //! load a muway file, \throws mussa_load_error
56 void load(std::string load_file_path);
57 void add_path(int threshold, std::vector<int>& loaded_path);
58 void add_path(ConservedPath loaded_path);
59 //! how many sequences are in our comparison
60 size_t sequence_count();
62 void find_paths(std::vector<std::vector<FLPs> > all_comparisons);
65 void save_old(std::string save_file_path);
66 void print(std::list<std::vector<int> >&);
68 std::list<ConservedPath>::iterator pbegin() { return pathz.begin() ; }
69 std::list<ConservedPath>::iterator pend() { return pathz.end() ; }
70 std::list<ExtendedConservedPath>::iterator rpbegin() { return refined_pathz.begin() ; }
71 std::list<ExtendedConservedPath>::iterator rpend() { return refined_pathz.end() ; }
72 // these probably shouldn't be public, but lets start
74 std::list<ConservedPath> pathz;
75 std::list<ExtendedConservedPath > refined_pathz;