error: end of tree file

138 views
Skip to first unread message

Janani Hariharan

unread,
Feb 23, 2024, 8:12:29 PMFeb 23
to PAML discussion group
Hi all, 

I get the error mentioned above when I try to run codeml with the branch model. This is my tree:

(GCF_000007945.1 #1:0.210868635,GCF_000007745.1:0.162580446,(GCF_000807275.1:0.236663749,((GCF_000299015.1:0.266877891,((GCF_000463355.1:0.000000005,GCF_000463385.1:0.008577283)0.999:0.191176727,(GCF_000270145.1:0.000000005,GCF_000027185.1:0.007862090)0.999:0.377840976)0.055:0.018590978)0.996:0.954945266,((GCF_000463395.1:0.0,GCF_000463425.1:0.0,GCF_000463445.1:0.0):1.518268088,GCF_000565195.1:0.531959172)0.953:0.517388668)0.995:0.988119269)0.933:0.204616884);

and my control file is attached. 

It seems to run fine when I don't select a foreground branch but fails with an "end of tree file" error when I do so. Any suggestions?

Thanks, 

Janani

codeml.ctl

Sandra AC

unread,
Feb 26, 2024, 9:59:23 AMFeb 26
to PAML discussion group
Hi Janani,

I can see that you still have the branch lengths (and I think some bs support values) included in the Newick tree, which may be causing errors (i.e., you should only have the tree topology and the `#[0-9]` labels if you are to run the branch or branch-site models with CODEML).

Can you remove the branch lengths and support values in your Newick tree and run CODEML again? Also, please make sure to include a PHYLIP header in the format of `num_taxa 1` in your input tree file. All the details regarding how to format your input sequence and tree files can be found on the PAML Wiki :)

Hope this helps, please let us know if that approach sorted out this issue!
S.

nathanael....@gmail.com

unread,
Feb 26, 2024, 10:57:42 AMFeb 26
to PAML discussion group
Hi Sandra,

I wonder if I might chip in here with a question: what happens in codeml when the branch lengths are left in the input tree? I've just compared two runs of the branch model (model = 2, NSsites = 0), once with the starting tree with branch lengths and once without, with 4.10.7, and received identical results - until now I'd been under the impression that codeml was ignoring the branch lengths (with fix_blength = 0 or unspecified), but maybe you could clarify if they're being used to influence the starting parameters or anything else?

Thanks for the help,

Nathanael

Sandra AC

unread,
Feb 26, 2024, 11:22:35 AMFeb 26
to PAML discussion group
Hi Nathanael,

Input tree files should not have branch lengths/bootstrap values in order to avoid possible "clashes" with the labels that users can specify to enable specific features available in PAML programs such as CODEML or MCMCtree.

When using CODEML to test for positive selection, if there are no clashes between "PAML labels" specified by users and "branch lengths/bootstrap values/other labels" present in the Newick tree, CODEML may be able to ignore them and run without errors (i.e., they will not impact the analysis). Nevertheless, this is not always the case, and that is the reason for asking users to remove branch lengths and other labels that may interfere with other PAML labels and stop CODEML from running. For details on template control files you can use to run CODEML under various scenarios, you can also check the GitHub repository we published last year.

If you are using CODEML for ancestral state reconstruction or other analyses, you may have to specify whether you want to keep the branch lengths as "starting values" -- note that this is a different type of analysis from the one Janani was referring to. In that case, branch lengths may be required if users want to use them as starting values. You can find more details about other analyses you can run with CODEML and how to enable them in the PAML documentation.

Hope this helps and clarifies your doubts :)
S.

nathanael....@gmail.com

unread,
Feb 26, 2024, 11:23:36 AMFeb 26
to PAML discussion group
Wonderful, thanks for clarifying and for the detailed reply!

Janani Hariharan

unread,
Feb 27, 2024, 8:04:47 PMFeb 27
to PAML discussion group
This does solve my issue, thanks for the help and the handy documentation link!
Reply all
Reply to author
Forward
0 new messages