How to bootstrap branch lengths on fixed topology?

55 views
Skip to first unread message

Andrew Swafford

unread,
Apr 17, 2019, 6:05:19 PM4/17/19
to IQ-TREE
I'm attempting to bootstrap branch lengths on a fixed topology, I think this can be done in RAxML, but I was wondering how it might be done in IQTree.
Ideally, each tree would have the full set of taxa and the same branching order, but would have branch lengths estimated independently.

Here is a link to a similar question answered for RAxML: https://groups.google.com/forum/#!topic/raxml/9B8GmCG8KNE

Is there any similar function to RAxML's "-f j" in IQTree? I'm fairly certain this is the function I'm looking for, though it is unclear if bootstrapping the alignment keeps all taxa or is subsampling.
for reference:
"-f j": generate a bunch of bootstrapped alignment files from an          
        original alignment file. You need to specify a seed with "-b"          
        and the number of replicates with "-#" 

Thanks!

Andrew Swafford

unread,
Apr 17, 2019, 9:21:47 PM4/17/19
to IQ-TREE
Mostly solved thanks to finding this older post: https://groups.google.com/forum/#!topic/iqtree/D6ULh6g78tU

Minh Bui

unread,
Apr 18, 2019, 9:49:18 AM4/18/19
to IQ-TREE, Andrew Swafford
Hi Andrew,

The URL you sent is to compute branch lengths of the tree for the original alignment.

If you want to obtained bootstrapped branch lengths, you can combine with -b option:

iqtree -s ALN -te TREE -b 100 …

And look at .boottrees file.

Cheers,
Minh

--
You received this message because you are subscribed to the Google Groups "IQ-TREE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iqtree+un...@googlegroups.com.
To post to this group, send email to iqt...@googlegroups.com.
Visit this group at https://groups.google.com/group/iqtree.
For more options, visit https://groups.google.com/d/optout.

Caio A. Leal-Dutra

unread,
Nov 8, 2019, 7:01:31 AM11/8/19
to iqt...@googlegroups.com
Dear Mihn,
I am trying more or less the same thing as here https://groups.google.com/forum/#!topic/iqtree/D6ULh6g78tU

I have a fixed unrooted tree that I want just to compute the branch lengths, however, the output tree has different topology.
As I am trying to compute only branch lengths for 2700 different alignments, I need the same topology so I can parse the results in an automated way.
Is there any way to do that?

Original tree topology:
(C08,((C48,(C10,(C61,C24))),((C02,C13),C54)),Ptgra);

My commands (different options and different alignments):
iqtree -s cluster10.fas -te tree.tree -st CODON -m GY+F1X4+R2 -b 25 -nt 4 -pre test1  
iqtree -s cluster267.fas -te tree.tree -st CODON -m GY+F1X4+R2 -b 25 -nt 4 -pre test2
iqtree -s cluster10.fas -te tree.tree -st CODON -m MF -b 100 -nt 4 -pre test3

Output trees (ommiting branch lenghts just to show result topology):
test1: (C02,(((C08,Ptgra),(((C24,C61),C10),C48)),C54),C13);
test2: (C10,(C24,C61),(((C54,(C02,C13)),(C08,Ptgra)),C48));
test3: (C02,(((C08,Ptgra),(((C24,C61),C10),C48)),C54),C13);

Kind regards,

Caio
________________________________________
Mr. Caio A. Leal-Dutra
PhD Candidate (Microbiology)
F28 Post room, Cledwyn Building, Penglais
Institute of Biological, Environmental & Rural Sciences
Aberystwyth University
Aberystwyth
SY23 3DD UK

Minh Bui

unread,
Nov 10, 2019, 6:28:26 PM11/10/19
to IQ-TREE, Caio A. Leal-Dutra
Hi Caio,

These trees indeed have the same topology, just rooted differently. You will see this if you reroot the output trees. By default, IQ-TREE prints the unrooted trees from the first sequence in the alignment. You can use -o option change that behaviour.

For your 2nd question, I don’t know the best way to parse the newick file. Perhaps some R script with the APE package?

Cheers,
Minh

Caio A. Leal-Dutra

unread,
Nov 11, 2019, 8:50:44 AM11/11/19
to Minh Bui, IQ-TREE
Dear Minh,
thank you very much for your reply.

I tried your suggestion and it worked, I was expecting if I specified an outgroup, the final tree would be unrooted.
The parsing I mentioned will be done with a python script, thus the result tree for all the alignments should be identical. (I'm parsing it to label some branches for codeml analyses). But I'll figure out another way to do that.

Kind regards,

Caio
________________________________________
Mr. Caio A. Leal-Dutra
PhD Candidate (Microbiology)
F28 Post room, Cledwyn Building, Penglais
Institute of Biological, Environmental & Rural Sciences
Aberystwyth University
Aberystwyth
SY23 3DD UK

Minh Bui

unread,
Nov 11, 2019, 3:43:43 PM11/11/19
to Caio A. Leal-Dutra, IQ-TREE
I see it now. 

Then you can put the label directly on to your original tree file, making sure that the first taxon in this tree is also the same taxon for -o option. IQ-TREE will preserve the labels in the output trees.

Cheers,
Minh
Reply all
Reply to author
Forward
0 new messages