1 #ifndef __CAFE_TREE_H__
2 #define __CAFE_TREE_H__
100 int kfix,
double max_branch_length,
double *k_weights);
107 #define E_NOT_SYNCHRONIZED 1
108 #define E_INCONSISTENT_SIZE 2
int holder
Definition: cafe.h:24
double * z_membership
Definition: cafe.h:23
char * id
Definition: cafe.h:13
pTreeNode cafe_tree_new_empty_node(pTree pcafe)
Definition: cafe_tree.c:29
void cafe_tree_free(pCafeTree pcafe)
Definition: cafe_tree.c:82
void cafe_family_set_truesize_with_family(pCafeFamily pcf, int idx, pCafeTree pcafe)
Definition: cafe_family.c:340
void add_key(pArrayList arr, double branchlength, double lambda, double mu)
Definition: cafe_tree.c:438
int maxlh
Definition: cafe.h:19
void cafe_tree_string_name(pString pstr, pPhylogenyNode ptnode)
Definition: cafe_tree.c:105
void compute_internal_node_likelihood(pTree ptree, pTreeNode ptnode)
Definition: cafe_tree.c:290
void cafe_likelihood_ratio_test(pCafeParam param, double *maximumPvalues)
Definition: cafe_main.c:539
Definition: utils_string.h:9
pCafeTree cafe_tree_split(pCafeTree pcafe, int idx)
Definition: cafe_tree.c:573
void compute_tree_likelihoods(pCafeTree pcafe)
Definition: cafe_tree.c:384
double * mu
Definition: cafe.h:22
int cafe_tree_random_familysize(pCafeTree pcafe, int rootFamilysize, int maxFamilySize)
Definition: cafe_tree.c:619
void __cafe_tree_free_node(pTree ptree, pTreeNode ptnode, va_list ap)
Definition: cafe_tree.c:68
double * lambda
Definition: cafe.h:21
pString cafe_tree_string_with_familysize(pCafeTree pcafe)
Definition: cafe_tree.c:159
void cafe_family_set_size_with_family_forced(pCafeFamily pcf, int idx, pCafeTree pcafe)
Definition: cafe_family.c:291
char * desc
Definition: cafe.h:18
int cafe_family_get_index(pCafeFamily pcf, const char *szid)
Definition: gene_family.cpp:375
void reset_k_likelihoods(pCafeNode pcnode, int k, int num_factors)
Definition: cafe_shell.c:40
void input_values_randomize(input_values *vals, int lambda_len, int mu_len, int k, int kfix, double max_branch_length, double *k_weights)
Definition: cafe_main.c:124
void cafe_log(pCafeParam param, const char *msg,...)
Logs the message and parameters in a standard way.
Definition: cafe_main.c:26
pString cafe_tree_string_with_familysize_lambda(pCafeTree pcafe)
Definition: cafe_tree.c:149
int cafe_family_split_cvfiles_byfamily(pCafeParam param, int cv_fold)
Definition: cafe_family.c:36
pString cafe_tree_string_with_id(pCafeTree pcafe)
Definition: cafe_tree.c:164
void cafe_free_birthdeath_cache(pCafeTree pcafe)
Definition: cafe_main.c:46
void cafe_family_reset_maxlh(pCafeFamily pcf)
Definition: gene_family.cpp:364
void cafe_family_set_size(pCafeFamily pcf, pCafeFamilyItem pitem, pCafeTree pcafe)
Copy sizes of an individual gene family into the tree.
Definition: cafe_family.c:266
struct chooseln_cache cache
A cache of values of chooseln.
Definition: birthdeath.c:32
void cafe_family_split_cvfiles_byspecies(pCafeParam param)
Definition: cafe_family.c:107
void cafe_tree_viterbi_posterior(pCafeTree pcafe, pCafeParam param)
Definition: viterbi.cpp:471
enumCafeReport
Definition: cafe.h:30
void cafe_tree_string_print(pCafeTree pcafe)
Definition: cafe_tree.c:175
void cafe_tree_viterbi(pCafeTree pcafe)
Definition: viterbi.cpp:439
pCafeTree cafe_tree_copy(pCafeTree psrc)
Definition: cafe_tree.c:563
Represents a single gene family and the number of members of that family that exist in each species...
Definition: cafe.h:11
A cache of values of chooseln.
Definition: chooseln_cache.h:16
void cafe_tree_node_free_clustered_likelihoods(pCafeParam param)
Definition: cafe_tree.c:878
void cafe_lambda_set_default(pCafeParam param, double *lambda)
Definition: cafe_main.c:103
int sync_sanity_check(pCafeFamily pcf, pCafeTree pcafe)
Definition: cafe_family.c:240
pCafeTree cafe_tree_new(const char *sztree, family_size_range *range, double lambda, double mu)
Definition: cafe_commands.cpp:2003
Singleton structure that holds all of the global data that Cafe acts on.
Definition: family.h:115
void cafe_family_filter(pCafeParam param)
Definition: gene_family.cpp:263
double ** cafe_tree_clustered_likelihood(pCafeTree pcafe, struct chooseln_cache *ln_cache)
Definition: cafe_tree.c:895
pString cafe_tree_string_with_lambda(pCafeTree pcafe)
Definition: cafe_tree.c:154
int * count
Definition: cafe.h:17
void cafe_tree_clustered_viterbi(pCafeTree pcafe, int num_likelihoods)
Definition: viterbi.cpp:464
int cafe_family_set_species_index(pCafeFamily pcf, pCafeTree pcafe)
Synchronize a family and tree together.
Definition: cafe_family.c:173
double * cafe_each_best_lambda_by_fminsearch(pCafeParam param, int lambda_len)
Definition: cafe_main.c:367
int ref
Definition: cafe.h:20
A cache of values of family size transition probabilities.
Definition: birthdeath.h:39
void cafe_tree_set_parameters(pCafeTree pcafe, family_size_range *range, double lambda)
Definition: cafe_tree.c:43
void cafe_family_set_size_by_species(char *speciesname, int size, pCafeTree pcafe)
Definition: cafe_family.c:386
std::vector< std::vector< double > > matrix
Definition: branch_cutting.h:11
void node_set_birthdeath_matrix(pCafeNode pcnode, pBirthDeathCacheArray cache, int num_lambdas)
Initialize node with probability values that it may need. If multiple lambdas are set...
Definition: cafe_tree.c:403
double * cafe_best_lambda_by_fminsearch(pCafeParam param, int lambda_len, int k)
Definition: lambda.cpp:523
double * get_likelihoods(const pCafeTree pcafe)
Definition: cafe_tree.c:389
void cafe_family_set_size_with_family(pCafeFamily pcf, int idx, pCafeTree pcafe)
Definition: cafe_family.c:312
Structure representing a matrix of values of family sizes.
Definition: family.h:88
void initialize_leaf_likelihoods_for_viterbi(double **matrix, int num_rows, int range, int familysize, int num_cols, pErrorStruct errormodel)
Initialize matrix values according to the error model or to defaults if familysize < 0...
Definition: cafe_tree.c:202
CafeFamilyItem * pCafeFamilyItem
Definition: cafe.h:27
int cafe_family_get_species_index(pCafeFamily pcf, char *speciesname)
Definition: cafe_family.c:222
void initialize_leaf_likelihood_clustered(pTree ptree, pTreeNode ptnode)
Definition: cafe_tree.c:627
void reset_birthdeath_cache(pCafeTree tree, int k_value, family_size_range *range)
Definition: cafe_main.c:319
double cafe_tree_mp_remark(pString str, pTree ptree, pMetapostConfig pmc, va_list ap)
Definition: cafe_tree.c:183
double cafe_get_clustered_posterior(pCafeParam param, double *ML, double *MAP, double *prior_rfsize)
Definition: cafe_main.c:165
pString cafe_tree_string(pCafeTree pcafe)
Definition: cafe_tree.c:170