Sergei
|
Dear Miguel,
HYPHY was unrooting the ((a,b),c) tree to (a,b,c) and losing the model on the interior branch. You need to set a flag to override this behavior. I also show an example of how to use LFCompute to evaluate the LF; since you don't need to Optimize. Finally, because your models have different stationary distros, use the LikelihoodFunction3 construct to tell HyPhy which one to use at the root.
[code] ... ACCEPT_ROOTED_TREES = 1; Tree myTree = "((N1{K1},N2{K0})A2{KX},N3{K0})"; LikelihoodFunction3 logL = (CodonData, myTree,rx); LFCompute(logL,LF_START_COMPUTE); LFCompute(logL,value); LFCompute(logL,LF_DONE_COMPUTE);
fprintf(stdout, "Likelihood according to HyPhy: ", Exp(value), "\n"); ... [/code]
Results [code] Likelihood according to HyPhy: 0.022623 Likelihood computed "by hand": 0.022623 [/code]
Cheers, Sergei
|