This is a provisional scruffy documentation that still has to be updated. The code is written in OCTAVE and C++ The principal files to look at are: experiments/runCodon.m experiments/plotCodon.m runCodon(model,dataset) Run model number model on dataset dataset. plotCodon(model,dataset) plots the results for said combination datasets: 1: Maize 2: Neisseria 3: HIV Models: See descriptions in experiments/runCodon. All models include a codon effect for the rate using a dirchlet to split between 3 positions. There are two ways of doing this. Models 1-4 take one approach, 5 does a different approach. Models 1-4 have an extra factor (chain) called the alignment chain. 1,2,3 are different OCR alignemnt frames, 4 is no codon effect present. When not codon effect is present, the model averages the rate states. Model 1 fixes the TTR and peqnuc. Model 2 ties the TTR and peqnuc, but creates and destroys such joint ttr and peqnucs states. Model 3 makes TTR and peqnuc have seperate chains Model 4 makes TTR have a codon effect as well. Same alignment chain. Model 5 introduces two types of rate states, and two types of ttr states. One has a codon effect, one doesn't, and it is selected with a iscodon parameter in the state. The OCR alignment chain only contains three types of states. Hopefully, the code is pretty obvious. If you have any questions, ask me. If you want immediate results, do runCodon(1,1);plotCodon(1,1); Analyse results, then: runCodon(2,1);plotCodon(2,1); runCodon(3,1);plotCodon(3,1); runCodon(4,1);plotCodon(4,1); runCodon(5,1);plotCodon(5,1); Another enhancment is to add the alignment error detection chain which tests the possibility of the alignment being wrong. Comes in useful for HIV, but the implementation isn't finished yet. Outline is in runCodon.m, just needs a suitable obslik calculator function. Hopefully, it should be clear enough where to put the branch lengths - For instance, set p.chains{1}.mixcomps{1,2,3}.branchlengths in runCodon, and add a loop to update it in Barge_run, and create a suitable obslik caclulator function (and set p.sampleGivenStates to this). Warning. sampleGivenStates should be calculateObslikForChain, but I haven't had time to refactor the code. Most of the new emission obslik caluclators are in emissionModel/. Nothing is yet tied in with the cluster, or with the old system of doing things based on text strings. All old experiments are currently broken, and probably not interesting anyway. Old README is wrong.