The files that we are going to use for this example are:
ete_evol tools allows to run directly CodeML using PAML configuration file.
%%bash
cat data/lysozyme/lysozymeSmall.ctl
The configuration file above corresponds to a branch model where marked branches are allowed to evolve at different $\omega$ rate than non-marked branches. In this example from PAML, the branch marked is the branch c (the ancestor of Angolan colobus and Douc langur). See the tree in the PAML example:
%%bash
head data/lysozyme/lysozymeSmall.trees
Running codeml from the ete_evol tool using this configuration file would be:
%%bash
ete3 evol --codeml_config_file data/lysozyme/lysozymeSmall.ctl
This command will run codeml on the control file with the only difference that the output file will be replaced by an output folder where all PAML ouput files will be stored.
%%bash
ls data/lysozyme/mlc/XX.lysozymeSmall.ctl/
Notice that an extra folder called XX.lysozymeSmall.ctl
is created in order to allow one extra layer of organization if several control files have the same "outfile".
At the end of the main codeML output file we can see the result of the optimized branch model with a foreground $\omega$ of 3.5 and a background $\omega$ of 0.7
%%bash
tail -n 5 data/lysozyme/mlc/XX.lysozymeSmall.ctl/out
On top of this, the ete_evol tool will generate a summary image:
from IPython.display import Image
Image(filename='data/lysozyme/tree_evol_example1.png')
Image which can be called interactively using the --view
flag:
%%bash
ete3 evol --codeml_config_file data/lysozyme/lysozymeSmall.ctl --view --resume
from IPython.display import Image
Image(filename='data/lysozyme/ete_run1_lysozyme.png')