source: branches/ali/GDE/PHYML20130708/phyml/src/lk.h

Last change on this file was 10307, checked in by aboeckma, 11 years ago

added most recent version of phyml

File size: 4.7 KB
Line 
1/*
2
3PHYML :  a program that  computes maximum likelihood  phylogenies from
4DNA or AA homologous sequences
5
6Copyright (C) Stephane Guindon. Oct 2003 onward
7
8All parts of  the source except where indicated  are distributed under
9the GNU public licence.  See http://www.opensource.org for details.
10
11*/
12
13#include <config.h>
14
15#ifndef LK_H
16#define LK_H
17
18#include "utilities.h"
19#include "optimiz.h"
20#include "models.h"
21#include "free.h"
22#include "times.h"
23#include "mixt.h"
24
25void Init_Tips_At_One_Site_Nucleotides_Float(char state, int pos, phydbl *p_lk);
26void Init_Tips_At_One_Site_AA_Float(char aa, int pos, phydbl *p_lk);
27void Get_All_Partial_Lk(t_tree *tree,t_edge *b_fcus,t_node *a,t_node *d);
28void Get_All_Partial_Lk_Scale(t_tree *tree,t_edge *b_fcus,t_node *a,t_node *d);
29void Post_Order_Lk(t_node *pere, t_node *fils, t_tree *tree);
30void Pre_Order_Lk(t_node *pere, t_node *fils, t_tree *tree);
31phydbl Lk(t_edge *b, t_tree *tree);
32void Site_Lk(t_tree *tree);
33/* phydbl Lk_At_Given_Edge(t_edge *b_fcus,t_tree *tree); */
34phydbl Return_Abs_Lk(t_tree *tree);
35matrix *ML_Dist(calign *data, t_mod *mod);
36phydbl Lk_Given_Two_Seq(calign *data, int numseq1, int numseq2, phydbl dist, t_mod *mod, phydbl *loglk);
37void Unconstraint_Lk(t_tree *tree);
38void Update_P_Lk(t_tree *tree,t_edge *b_fcus,t_node *n);
39void Update_P_Lk_Generic(t_tree *tree,t_edge *b_fcus,t_node *n);
40void Update_P_Lk_AA(t_tree *tree,t_edge *b_fcus,t_node *n);
41void Update_P_Lk_Nucl(t_tree *tree,t_edge *b_fcus,t_node *n);
42void Init_P_Lk_Tips_Double(t_tree *tree);
43void Init_P_Lk_Tips_Int(t_tree *tree);
44void Init_P_Lk_At_One_Node(t_node *a, t_tree *tree);
45void Update_PMat_At_Given_Edge(t_edge *b_fcus, t_tree *tree);
46void Sort_Sites_Based_On_Lk(t_tree *tree);
47void Get_Partial_Lk_Scale(t_tree *tree, t_edge *b_fcus, t_node *a, t_node *d);
48void Get_Partial_Lk(t_tree *tree, t_edge *b_fcus, t_node *a, t_node *d);
49void Init_Tips_At_One_Site_Nucleotides_Int(char state, int pos, short int *p_pars);
50void Init_Tips_At_One_Site_AA_Int(char aa, int pos, short int *p_pars);
51void Update_P_Lk_Along_A_Path(t_node **path, int path_length, t_tree *tree);
52phydbl Lk_Dist(phydbl *F, phydbl dist, t_mod *mod);
53phydbl Update_Lk_At_Given_Edge(t_edge *b_fcus, t_tree *tree);
54void Update_P_Lk_Greedy(t_tree *tree, t_edge *b_fcus, t_node *n);
55void Get_All_Partial_Lk_Scale_Greedy(t_tree *tree, t_edge *b_fcus, t_node *a, t_node *d);
56phydbl Lk_Core(int state, int ambiguity_check, t_edge *b, t_tree *tree);
57phydbl Lk_Triplet(t_node *a, t_node *d, t_tree *tree);
58void Print_Lk_Given_Edge_Recurr(t_node *a, t_node *d, t_edge *b, t_tree *tree);
59phydbl *Post_Prob_Rates_At_Given_Edge(t_edge *b, phydbl *post_prob, t_tree *tree);
60phydbl Lk_With_MAP_Branch_Rates(t_tree *tree);
61void Init_Tips_At_One_Site_Generic_Int(char *state, int ns, int state_len, int pos, short int *p_pars);
62void Init_Tips_At_One_Site_Generic_Float(char *state, int ns, int state_len, int pos, phydbl *p_lk);
63void Alias_Subpatt(t_tree *tree);
64void Alias_One_Subpatt(t_node *a, t_node *d, t_tree *tree);
65void Alias_Subpatt_Post(t_node *a, t_node *d, t_tree *tree);
66void Alias_Subpatt_Pre(t_node *a, t_node *d, t_tree *tree);
67void Copy_P_Lk(phydbl *p_lk, int site_from, int site_to, t_tree *tree);
68void Copy_Scale(int *scale, int site_from, int site_to, t_tree *tree);
69void Init_P_Lk_Loc(t_tree *tree);
70phydbl Lk_Normal_Approx(t_tree *tree);
71phydbl Wrap_Lk(t_edge *b, t_tree *tree, supert_tree *stree);
72phydbl Wrap_Lk_At_Given_Edge(t_edge *b, t_tree *tree, supert_tree *stree);
73phydbl Wrap_Part_Lk_At_Given_Edge(t_edge *b, t_tree *tree, supert_tree *stree);
74phydbl Wrap_Part_Lk(t_edge *b, t_tree *tree, supert_tree *stree);
75phydbl Wrap_Geo_Lk(t_edge *b, t_tree *tree, supert_tree *stree);
76phydbl Wrap_Diff_Lk_Norm_At_Given_Edge(t_edge *b, t_tree *tree, supert_tree *stree);
77phydbl Wrap_Lk_Rates(t_edge *b, t_tree *tree, supert_tree *stree);
78phydbl Wrap_Lk_Linreg(t_edge *b, t_tree *tree, supert_tree *stree);
79void Sample_Ancestral_Seq(int mutmap, int fromprior, t_tree *tree);
80void Map_Mutations(t_node *a, t_node *d, int sa, int sd, t_edge *b, int site, int rate_cat, int *muttype, phydbl *muttime, int *n_mut, t_tree *tree);
81void Sample_Ancestral_Seq_Pre(t_node *a, t_node *d, t_edge *b, 
82                              int site, int rate_cat, 
83                              int *muttype, phydbl *muttime, int *n_mut, 
84                              int mutmap, int fromprior, t_tree *tree);
85phydbl Wrap_Lk_Times(t_edge *b, t_tree *tree, supert_tree *stree);
86phydbl Lk_LastFirst(t_tree *tree);
87phydbl Invariant_Lk(int *fact_sum_scale, int site, int *num_prec_issue, t_tree *tree);
88void Rate_Correction(int exponent, phydbl *site_lk_cat, t_tree *tree);
89int Check_Lk_At_Given_Edge(int verbose, t_tree *tree);
90void ML_Ancestral_Sequences_One_Node(t_node *mixt_d, t_tree *mixt_tree);
91void ML_Ancestral_Sequences(t_tree *tree);
92
93#endif
94
95
96
97
98
99
Note: See TracBrowser for help on using the repository browser.