Constraint Tree in RaxmlNG

421 views
Skip to first unread message

Dylan Cohen

unread,
Oct 9, 2020, 5:55:40 PM10/9/20
to raxml
Hello, 

I am trying to create 100 bootstrapped trees with branch lengths from a single alingment using  RAxML-NG. I am interested to see the variation in branch lengths across 100 trees and to use this for downstream analyses. I have tried to use the --tree-constraint option but i guess this error: 

ERROR: You provided a comprehensive, fully-resolved tree as a topological constraint.Since this is almost certainly not what you intended, RAxML-NG will now exit... 


Regardless of it being fully resolved or comprehensive, when I run RaxML without the constraint i get a different unsatisfactory topology, and hence the constraint. 

Has anyone gotten this error, and figured out a way around it ? 

Thanks!

Dylan 

Alexey Kozlov

unread,
Oct 9, 2020, 7:26:34 PM10/9/20
to ra...@googlegroups.com
Hi Dylan,

if constraint tree is comprehensive (=contains all taxa) and fully resolved (=has no
multifurcations), then there is no point in performing the tree search. This is because the search
space comprises only one topology - the constraint tree itself. Hence the error message.

If you just want to re-optimize branch lengths on a fixed topology using bootstrapped alignments,
you can achieve this by using "--bsmsa" command (generate replicate alignments) followed by
"--evaluate" (optimize branch lengths and model parameters).

Finally, if unconstrained tree search consistently yields "unsatisfactory" topology, then maybe your
alignment data does not support the topology that you expect?

Hope this helps,
Alexey
> --
> You received this message because you are subscribed to the Google Groups "raxml" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> raxml+un...@googlegroups.com <mailto:raxml+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/raxml/2882a2db-e07f-4ebc-b57c-e11faec2d021n%40googlegroups.com
> <https://groups.google.com/d/msgid/raxml/2882a2db-e07f-4ebc-b57c-e11faec2d021n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Dylan Cohen

unread,
Oct 10, 2020, 2:20:26 PM10/10/20
to raxml
Hi Alexey,

Thank you for the suggestion! So my line of code would look something like this? 

raxml-ng  --bsmsa --evaluate --bootstrap --msa  NG1.raxml.rba --model GTR+G --prefix NG3 --bs-trees 100 --tree-constraint c2.tre --seed 79999 --threads 10


Best,

Dylan


Alexey Kozlov

unread,
Oct 11, 2020, 8:18:30 AM10/11/20
to ra...@googlegroups.com
Hi Dylan,

no, you need two separate raxml-ng invocations:

1) raxml-ng --bsmsa --msa NG1.raxml.rba --prefix BOOT --bs-trees 100 --seed 79999

this will generate a bunch of bootstrap replicate files named BOOT.raxml.bootstrapMSA.<REP>.phy,
where <REP>=1,2..100

2) you re-optimize brlens on each of the bootstrap replicate MSAs, e.g.:

raxml-ng --evaluate --msa BOOT.raxml.bootstrapMSA.1.phy --model GTR+G --tree c2.tre --prefix EVAL1
--threads 10

Please see raxml-ng documentation for further details:

https://github.com/amkozlov/raxml-ng/wiki

Best,
Alexey
> https://groups.google.com/d/msgid/raxml/2d6158dd-4d93-4d96-a2de-03fdf0219e61n%40googlegroups.com
> <https://groups.google.com/d/msgid/raxml/2d6158dd-4d93-4d96-a2de-03fdf0219e61n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Grimm

unread,
Oct 12, 2020, 3:09:29 AM10/12/20
to raxml
Hi Dylan,

in addition to Alexey's answer regarding the "unsatisfactory topology" keep in mind that bootstrapping "just" assesses character/site support for alternative topologies, it does not test alternative topologies (see also this 2014 post by David Morrison: Some things you probably don't know about the bootstrap)

Pending the signal structure in your alignment (and its size), a bootstrap resample may hence be completely devoid of discriminative characters or extremely biased by a few characters. In addition, when we perform a bootstrap analyses, we don't optimize the model (the final one or two steps of RAxML), i.e. we use a crude model to calculate branch-lengths for the BS pseudoreplicate trees, thus, get usually poor branch-lengths (why we never consider them when summing up the bootstrapping results, e.g. using support consensus networks). Hence, the "unsatisfactory topology". Anything else would mean you have a perfect matrix, in which most alignment patterns fit the true and only tree. In other words, trivial data where no branch support would be needed and any tree inference method would get the same tree (and model-independent).

If you're interested not only in branch-lengths but to see which fraction of your alignment sites (characters) supports which aspects of your preferred topology, alternatives to the branch-back-optimisation suggested by Alexey are (note: by seperating bootstrap resampling from tree optimisation step as Alexey detailed below; we allow RAxML to modify the model for each BS replicate tree – this is imperative to get branch-lengths matching the BS replicate's signal):
  • make use RAxML ML ancestral state reconstruction and read out the number sites mutating for each subtree
  • do the same in Mesquite (has more options than RAxML in that regard)
  • or (which probably is the easiest and most straightforward), use IQtree's site concordance factors
Cheers, Guido
Reply all
Reply to author
Forward
0 new messages