This cookbook aims at reproducing the results about selection on sites in a given lineage presented in the work Yang Z (MBE, 2005) using ete-evol
.
The data files adapted from the examples in the PAML package, large dataset will be used.
This files are:
%%bash
ete3 view -t data/lysozyme/lysozymeLarge.nw --alg data/lysozyme/lysozymeLarge.fasta --alg_type compactseq \
-i data/lysozyme/lysozymeLarge.png
from IPython.display import Image
Image(filename='data/lysozyme/lysozymeLarge.png')
In particular we aim at reproducing the highlighted part the Table2:
from IPython.display import Image
Image(filename='data/lysozyme/table5_YangZ_2005.png')
We are thus going to run 6 models.
First we run models M1 and M2:
%%bash
ete3 evol -t data/lysozyme/lysozymeLarge.nw --alg data/lysozyme/lysozymeLarge.fasta --models M1 bsA bsA1 -o /tmp/ete3-tmp/ \
--mark "colobus_Cgu&Can,,probiscis_Nla" --cpu 3 --resume -i data/lysozyme/lysozymeLarge_bsA_bsA1_M1.png
In the output above we can see in the LRT the results of the so called "test 1" (bsA vs M1) and "test 2" (bsA vs bsA1), and in both cases, the results are in favor of the null hypothesis just as persented in the article.
The image generated by the ete_evol tool:
from IPython.display import Image
Image(filename='data/lysozyme/lysozymeLarge_bsA_bsA1_M1.png')
To search for lineages with specific sites evolving under positive selection we could explore the selective pressure on branches using the free-ration (or free-branch) model:
%%bash
ete3 evol -t data/lysozyme/lysozymeLarge.nw --alg data/lysozyme/lysozymeLarge.fasta --models fb -o /tmp/ete3-tmp/ \
--cpu 1 --resume -i data/lysozyme/lysozymeLarge_fb.png
from IPython.display import Image
Image(filename='data/lysozyme/lysozymeLarge_fb.png')
Many lineage seems to have evolved at high $\omega$ rates. We will use the hominide ancestor.
%%bash
ete3 evol -t data/lysozyme/lysozymeLarge.nw --alg data/lysozyme/lysozymeLarge.fasta --models M1 bsA bsA1 -o /tmp/ete3-tmp/ \
--mark orangutan_Ppy,,gibbon_Ggo --cpu 3 --resume -i data/lysozyme/lysozymeLarge_hominidae_bsA_bsA1_M1.png
from IPython.display import Image
Image(filename='data/lysozyme/lysozymeLarge_hominidae_bsA_bsA1_M1.png')
This time we do find a couple of sites under positive section in the hominide ancestors.