Codeml: Maximum likelihood rooted tree

113 views
Skip to first unread message

Gholam-Hossein Jowkar

unread,
Aug 3, 2023, 7:54:33 AM8/3/23
to PAML discussion group
Dear PAML team,

Thank you very much for your fantastic software. I have a question about the mechanism you have computed the maximum likelihood (ML) tree while keeping it rooted.

I used the Codeml (from paml-4.10.3) to get the ML tree. Surprisingly, the output was also rooted after providing the rooted tree to the Codeml. With little warning, "This is a rooted tree. Please check!".

I needed a tree with fix topology, which I happily took and used in my analysis. Now, my question is how do you provide a ML rooted tree?

These are the control file options I used:
noisy = 9
verbose = 0
runmode = 0
seqtype = 2
aaDist = 0
aaRatefile = ./paml-4.10.3/dat/wag.dat
NSsites = 0
cleandata = 1
fix_blength = 1

Many thanks,
Hossein

Sandra AC

unread,
Aug 4, 2023, 8:53:57 AM8/4/23
to PAML discussion group
Dear Hossein, 

Thanks for your message! Please note that, if your input tree is rooted, so will your output tree. The warning you get is a reminder about your input tree file being rooted so that you make sure this is what you really intended. Also, in your attached sections of the control file, you are missing the section to define your input and output files. Please go through the PAML documentation to make sure you include the options you need. You can also take a look at this template control file (i.e., it is a template with flags, you will not see exact values for the options in the control file) we provided to run CODEML when running tests for positive selection.

Please note that, as per the PAML documentation, which we are slowly formatting to generate a GitHub wiki on the PAML repository, the tree search is rather primitive and it is recommended to use other software such as raxml-ng, iq-tree, etc. to infer your phylogeny. Then, you may fix that topology to run subsequent analyses with PAML programs. If you want to use CODEML for positive selection, you can take a look at the section "rooted versus unrooted trees" in our supplementary material to make sure that using either a rooted or an unrooted tree fits your initial hypothesis. 

Hope this helps!
Sandra

Gholam-Hossein Jowkar

unread,
Aug 7, 2023, 6:03:28 AM8/7/23
to PAML discussion group

Dear Sandra,

Thank you very much for your prompt reply.

I indeed wanted to have a rooted tree. 

But my question is, how does CodML provide the root? (please note that I provided the rooted tree to the code)
Is it like PhyML, which works with unrooted trees, or is it using methods like mid-point rerooting, or is it working with the rooted tree from the beginning?

Many thanks,
Hossein

Sandra AC

unread,
Aug 7, 2023, 6:20:25 AM8/7/23
to PAML discussion group
Dear Hossein, 

When I said " [..] if your input tree is rooted, so will your output tree", I should have specified that the same root you give in your input tree will be kept in your output tree. In other words, CODEML will not change that nor infer a differing rooting from the one you specified in your input tree.

Cheers!
S.
Reply all
Reply to author
Forward
0 new messages