User:Carl Boettiger/Notebook/Comparative Phylogenetics/2010/07/14

{| width="800"
 * style="background-color: #EEE"|[[Image:owwnotebook_icon.png|128px]] Comparative Phylogenetics
 * style="background-color: #F2F2F2" align="center"|  |Main project page
 * style="background-color: #F2F2F2" align="center"|  |Main project page


 * colspan="2"|
 * colspan="2"|

Codes

 * Should have a suite of likelihood tools as a package
 * Suite of data manipulation functions, mostly to and from ape/ouch

idealized workflow:


 * Read in nexus file and csv data.
 * Call model fit for each model to be tested (BM, one peak, multiple peaks, multiple peaks with independent selective forces)


 * A function checks tree and data for matches, discards those without match. This could be done automatically by the model fit.  Could use a flag to disable the check when being called by the bootstrap function.
 * Convert data to the correct format. This could be done by the model fit, again with a flag to disable checking if not needed.
 * Model fit should take tree in either format and return it in the format given. Tools should allow conversions between formats later as well.

More Examples

 * Labrid data set with parrot fish as separate regime.

Example illustrates data starting with nexus file and csv, dropping unmatched tips, converting formats and identifying clade by the common ancestor of its two most distant members:

bootstrap is still running...

Optimization thoughts

 * While seeding the alpha and sigma values with the global estimates increases the convergence speed of the simplex method, it is possible that this biases the method to estimate that the regimes are more similar than they actually are, since getting off the ridge might be difficult. (Could consider ways to not treat alpha and sigma independently?)  Testing this idea with the simulated annealing approach, which has a better chance of getting off the ridge.


 * R code can now toggle algorithm to use simulated annealing or simplex method.


 * Using the labrid data set with fin morphology, simulated annealing does seem to get off the ridge. However, estimated optimum is outside the observed range, suggests uncertainty dominates the parameter estimates of the smaller parrotfish clade rather than representing significant differences.


 * }