Error: too many daughter nodes, raise MAXNSONS

1,092 views
Skip to first unread message

elgan john

unread,
Feb 18, 2013, 8:03:23 AM2/18/13
to pamlso...@googlegroups.com
hello,
I am getting this error, I have had in the past (year or so ago) and it was solved by changing something and recompiling the program, unfortunately I don't remember exactly what I did, any help would be appreciated.
Cheers! 

Ziheng

unread,
Mar 6, 2013, 1:57:22 AM3/6/13
to pamlso...@googlegroups.com

that error is generated when you have a multifurcating tree.
you open the source file and find a line that looks like the following

#define MAXNSONS 5
and increase the number.  this sets the maximum number of daughter nodes for each node on the tree.
however some programs such as mcmctree requires a fully resolved tree, and won't take a multifurcating tree at all, in which case making that change won't cure the problem.  it sounds like yours is not such a case.
ziheng

maoxiao...@gmail.com

unread,
Aug 15, 2013, 9:50:14 PM8/15/13
to pamlso...@googlegroups.com
Hello,
I have met this problem,too.
Error: too many daughter nodes, raise MAXNSONS
I used mcmctree.exe to caculated divergence times, and I saw Ziheng had gived the answer, but unfortunately, my problem was mcmctree,how can I change my program?Any help would be appreciated!
Thank you!

Ziheng

unread,
Sep 5, 2013, 5:57:01 PM9/5/13
to pamlso...@googlegroups.com
The tree for mcmctree has to be fully resolved. It should be a binary rooted tree.
Ziheng yang

Vivek Keshri

unread,
Apr 29, 2014, 1:04:47 PM4/29/14
to pamlso...@googlegroups.com
Hello Friends, 

I am using MrBayes and PAML for ancestral sequence reconstruction. I have executed MrBayes successfully with 667 protein sequences as input and finally I got the tree file. 

Now I am trying to execute codeml.ctl (Tree file and multiple sequence alignment file as input in codeml) but I am also getting an error " Error: too many daughter nodes, raise MAXNSONS".

My question is How to fix this error? If you explain in details, it would be wonderful for me... 

Waiting for favorable response... 

Sincerely, 

Vivek Keshri 

Ziheng

unread,
Aug 3, 2014, 7:24:54 PM8/3/14
to pamlso...@googlegroups.com
Mrbayes probably gives you a consensus tree with collapsed nodes. The consensus tree with polytomies has no chance of being correct, and you should avoid using it. If it prints the MAP tree, the tree with the highest posterior, you can use that instead. Alternatively you can use an ML program to get the ML tree, but again don't use the bootstrap consensus tree with polytomies,

Or you can open the file baseml.c or codeml.c and increase the value for the variable maxnsons, as explained in my post above.

For mcmctree analysis to estimate divergence times, you have to use a fully resolved tree.
Ziheng

Reply all
Reply to author
Forward
0 new messages