CAFE
Computational Analysis of gene Family Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
likelihood_ratio.cpp File Reference
#include <vector>
#include "likelihood_ratio.h"
#include "cafe.h"
#include <family.h>

Data Structures

struct  LRT2LParam
 

Functions

void likelihood_ratio_report (pCafeFamily pfamily, pCafeTree pcafe, const std::vector< double > &pvalues, const std::vector< int > &plambda, const std::vector< double * > &lambda_cache, FILE *fout)
 
void update_branchlength (pCafeTree pcafe, pTree lambda_tree, double bl_augment, int *old_branchlength, int *t)
 
double __cafe_lhr_get_likelihood_for_diff_lambdas (pCafeParam param, int idx, int t, std::vector< double * > &lambda_cache, std::vector< pBirthDeathCacheArray > &PBDC)
 
void * __cafe_lhr_for_diff_lambdas_i (pCafeParam param, std::vector< int > &lambda, std::vector< double > &pvalues, enum OPTIMIZER_INIT_TYPE lfunc, pTree lambda_tree, int num_lambdas, std::vector< double * > &lambda_cache, std::vector< pBirthDeathCacheArray > &PBDC)
 
void cafe_lhr_for_diff_lambdas (pCafeParam param, pTree lambda_tree2, int num_lambdas, enum OPTIMIZER_INIT_TYPE lfunc)
 

Variables

pBirthDeathCacheArray probability_cache
 
const double bl_augment = 0.5
 

Function Documentation

void* __cafe_lhr_for_diff_lambdas_i ( pCafeParam  param,
std::vector< int > &  lambda,
std::vector< double > &  pvalues,
enum OPTIMIZER_INIT_TYPE  lfunc,
pTree  lambda_tree,
int  num_lambdas,
std::vector< double * > &  lambda_cache,
std::vector< pBirthDeathCacheArray > &  PBDC 
)
double __cafe_lhr_get_likelihood_for_diff_lambdas ( pCafeParam  param,
int  idx,
int  t,
std::vector< double * > &  lambda_cache,
std::vector< pBirthDeathCacheArray > &  PBDC 
)
void cafe_lhr_for_diff_lambdas ( pCafeParam  param,
pTree  lambda_tree2,
int  num_lambdas,
enum OPTIMIZER_INIT_TYPE  lfunc 
)
void likelihood_ratio_report ( pCafeFamily  pfamily,
pCafeTree  pcafe,
const std::vector< double > &  pvalues,
const std::vector< int > &  plambda,
const std::vector< double * > &  lambda_cache,
FILE *  fout 
)
void update_branchlength ( pCafeTree  pcafe,
pTree  lambda_tree,
double  bl_augment,
int *  old_branchlength,
int *  t 
)

Variable Documentation

const double bl_augment = 0.5
pBirthDeathCacheArray probability_cache

The variable cafe_param is a global singleton that holds general program state. cafe_param holds pcafe, a CafeTree, and pfamily, a CafeFamily . These are set by the user via the commands "tree" and "load" respectively. When the user calls the command "lambda" calculations are performed on the pcafe and pfamily variables.