CAFE
Computational Analysis of gene Family Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
branch_cutting.h
Go to the documentation of this file.
1 #ifndef BRANCH_CUTTING_H_043A6EEC_78B6_4760_A3B8_F9343BB71F0E
2 #define BRANCH_CUTTING_H_043A6EEC_78B6_4760_A3B8_F9343BB71F0E
3 
4 #include <vector>
5 
6 extern "C" {
7 #include <family.h>
8 }
9 
10 class viterbi_parameters;
11 class Globals;
12 
13 typedef std::vector<std::vector<double> > matrix;
14 
15 class CutBranch
16 {
17  int node_count;
18 public:
19  std::vector<std::pair<matrix, matrix> > pCDSs;
20 
21  CutBranch(int nnodes) : node_count(nnodes), pCDSs(nnodes)
22  {
23  }
24 };
25 
26 void set_size_for_split(pCafeFamily pcf, int idx, pCafeTree pcafe);
27 void cafe_branch_cutting(Globals& globals, viterbi_parameters& viterbi);
28 void cut_branch(CutBranch& cb, pTree ptree, pCafeTree paramCafe, family_size_range& range, int num_threads, int num_random_samples, int b, std::ostream& ost);
29 void compute_cutpvalues(pCafeTree pparamcafe, pCafeFamily family, int num_random_samples, int b, int range_start, int range_stop, viterbi_parameters& viterbi, double pvalue, std::vector<double>& p1, double** p2, CutBranch& cb);
30 
31 #endif
void cafe_branch_cutting(Globals &globals, viterbi_parameters &viterbi)
Definition: branch_cutting.cpp:220
std::vector< std::pair< matrix, matrix > > pCDSs
Definition: branch_cutting.h:19
Definition: Globals.h:13
Definition: family.h:10
Definition: branch_cutting.h:15
void compute_cutpvalues(pCafeTree pparamcafe, pCafeFamily family, int num_random_samples, int b, int range_start, int range_stop, viterbi_parameters &viterbi, double pvalue, std::vector< double > &p1, double **p2, CutBranch &cb)
Definition: branch_cutting.cpp:101
void cut_branch(CutBranch &cb, pTree ptree, pCafeTree paramCafe, family_size_range &range, int num_threads, int num_random_samples, int b, std::ostream &ost)
Definition: branch_cutting.cpp:184
Definition: viterbi.h:31
void set_size_for_split(pCafeFamily pcf, int idx, pCafeTree pcafe)
Definition: branch_cutting.cpp:63
Definition: tree.h:11
double pvalue(double v, const double *conddist, int size)
Definition: mathfunc.c:663
CutBranch(int nnodes)
Definition: branch_cutting.h:21
std::vector< std::vector< double > > matrix
Definition: branch_cutting.h:11
Structure representing a matrix of values of family sizes.
Definition: family.h:88
Definition: family.h:17