Tree visualization of Placement with bootstrap values

772 views
Skip to first unread message

vincent...@uit.no

unread,
Jan 31, 2018, 2:30:02 AM1/31/18
to raxml
Hi,

I have completed EPA using RaXmL. I have first built a reference tree using: 
./raxmlHPC -f a -x 12345 -p 12345 -# 100 -M GTRGAMMA -s input_fastaaligned.fas -n output_filename -o outgroupName -w output_directory. 

From the best tree file, I have thereafter done the placement of smaller query sequences on the tree using:
./raxmlHPC -f v -m GTRGAMMA -s aligned_seqs_and_queries.fas -t reference_tree_from_above -w output_directory -n Placement

I would appreciate now to have a tree with the queries sequenced place and the bootstrap values of the reference trees. I have tested so far Figtree and Dendroscope, but none seem to offer such visualization. Do you have any recommendation on how to proceed?

Thank you!


Alexandros Stamatakis

unread,
Jan 31, 2018, 3:16:31 AM1/31/18
to ra...@googlegroups.com
Dear Vincent,

The output format of a placement run will not contain the BS values of
the reference tree. Thus, no visualization tool will be able to
visualize the BS support and the placements.

I'm bccing a couple of people who could help.

Lucas maybe you can do some magic with genesis to make this work?

Erick, Pierre, maybe we should extend the .jplace placement format to
also contain BS values?

Alexis
> --
> 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>.
> For more options, visit https://groups.google.com/d/optout.

--
Alexandros (Alexis) Stamatakis

Research Group Leader, Heidelberg Institute for Theoretical Studies
Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology

www.exelixis-lab.org

Sergios-Orestis Kolokotronis

unread,
Jan 31, 2018, 11:39:22 AM1/31/18
to raxml

This doesn't address Vincent's question per se. One could add the branch support values a posteriori on the tree figure and pick the nodes/branches of interest only – an entirely manual approach, admittedly. This is only my personal opinion on tree esthetics... the tree figure can get crowded with numerical values on the nodes or internode branches AND the placement confidence symbols, since they tend to overlap. 

Last time I checked, FigTree and Dendroscope couldn't parse jplace files. I like the iTOL online tree viewer https://itol.embl.de, because it allows for on-the-spot editing and can accommodate multiple layers of metadata to be plotted next to the tips, not to mention the establishment of a static URL that one can include in publications. Maybe iTOL can import node support values as metadata? No idea. Here's a couple of examples of EPA jplace files on iTOL... super easy to use.

https://itol.embl.de/tree/286234201192691468834200 – 16S rRNA short sequences placed on a reference Rickettsia tree.
https://itol.embl.de/tree/21616595883251465841813 – DPOL protein sequences placed on a reference Gammaherpesvirus tree.


Lucas Czech

unread,
Feb 1, 2018, 7:50:33 AM2/1/18
to ra...@googlegroups.com

Hi Vincent,

if I understood you correctly, you have:

  • A tree with BS values on it. Is that in Newick? Which convention for storing the values does it use, e.g. as inner node names, or "[0.12]", or the like?
  • A jplace file with your placement result.

Now, how do you want to visualize the jplace file? There are a couple of options depending on how many sequences you placed on that tree:

  • For just a few, you can add them as actual new branches to the tree. In that case, you can use a program that I wrote for this purpse: http://doc.genesis-lib.org/demos_labelled_tree.html
    It takes the jplace file and optionally a tree with BS values, which are then also put on the tree. The output is a tree that contains all placements as branches, and also the BS values.
  • If you have many sequences placed on the tree, adding each of them as a new branch becomes cluttered. In that case, you might want to summarize them for original branch of the reference tree instead, for example by color coding like this: http://doc.genesis-lib.org/demos_visualize_placements.html
    This program currently does not haven an option to add BS values, but I can add it if needed.

Furthermore, you might want to have a look at the R package ggtree, which can also work with jplace files: https://bioconductor.org/packages/devel/bioc/vignettes/treeio/inst/doc/Importer.html#parsing-epa-and-pplacer-output

Lastly, a little caveat when working with BS values in newick trees: https://academic.oup.com/mbe/article/34/6/1535/3077051 ;-)

So long
Lucas

--
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.

For more options, visit https://groups.google.com/d/optout.

ezra kitson

unread,
May 22, 2018, 6:37:54 PM5/22/18
to raxml

Hi Vincent,

Following up on Sergios’ advice i’ve written a shell script that will produce an iTOL dataset that can be used to add bootstrap symbols or text labels to a jplace tree.

It was created to use on the output from the EPA algorithm, but I think it will also work in your case.

https://github.com/Kzra/Bootstrap-Jplace

Hope it’s useful!

Ezra

Vincent Carrier

unread,
May 23, 2018, 1:47:35 AM5/23/18
to ra...@googlegroups.com

Thanks Ezra! I will test it as soon i can. Thanks again!

 

                       Vincent Carrier

--
You received this message because you are subscribed to a topic in the Google Groups "raxml" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/raxml/IildAkMRI9Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to raxml+un...@googlegroups.com.

Vincent Carrier

unread,
Oct 12, 2018, 12:31:40 PM10/12/18
to ra...@googlegroups.com

Hi,

 

I recently restarted using RAxmL and just tried your recommendation. I encounter however a problem:

bash bootstrap_jplace.sh RAxML_bipartitions.test RAxML_labelledTree.Placement

grep: Unmatched ) or \)

grep: Unmatched ) or \)

paste: nodeID2: No such file or directory

paste: nodeID2: No such file or directory

 

I attached the two files in which I am trying to use the bash file. I used the same protocol as below to get the reference tree (RAxML_bipartitions.test) and the placement tree (RAxML_labelledTree.Placement).

 

Am I using the wrong input files?

 

                       Vincent Carrier

 

From: ra...@googlegroups.com <ra...@googlegroups.com> On Behalf Of ezra kitson
Sent: onsdag 23. mai 2018 00:38
To: raxml <ra...@googlegroups.com>
Subject: [raxml] Re: Tree visualization of Placement with bootstrap values

 

Hi Vincent,

--

RAxML_labelledTree.Placement
RAxML_bipartitions.test

Lucas Czech

unread,
Oct 16, 2018, 4:52:47 AM10/16/18
to ra...@googlegroups.com

Hi Vincent,

not sure whether Ezra is still checking this thread, so I'll jump in.

bash sometimes is a bit tricky with the use of parenthesis in commands. Maybe Ezra used bash on a different system than you do, which might cause the difference. Anyway, the issue seems to come from lines 6 and 7 of the script (https://github.com/Kzra/Bootstrap-Jplace/blob/master/bootstrap_jplace.sh).

Try to replace them with those two lines:

grep -o -E '\).{3}' $1  | sed 's/)//' | sed 's/:0//' | sed 's/://' >BS

grep -o -E '.{4}\).{0}' $2 | sed 's/^.*{//' | sed 's/})//' >nodeID

That is, the two closing parenthesis in the grep command are now properly escaped. That might work.

Lucas

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.

Vincent Carrier

unread,
Oct 16, 2018, 4:54:16 AM10/16/18
to ra...@googlegroups.com

Thanks Lucas, I will try it and keep you updated!

 

                       Vincent Carrier

Vincent Carrier

unread,
Oct 16, 2018, 10:26:22 AM10/16/18
to ra...@googlegroups.com

Hi Lucas,

 

I tried the bash file and it indeed worked. I encountered however a problem further away while I was trying to implement it on iToL. The bash file has assigned node IDS that iToL doesn’t seem to recognize. I added the line sed -i -e 's/^/I/' nodeID2 and now it appears all is working fine. I added the modified script in case it can be useful for other. Thanks a lot!

 

                       Vincent Carrier

 

From: ra...@googlegroups.com <ra...@googlegroups.com> On Behalf Of Lucas Czech


Sent: tirsdag 16. oktober 2018 10:53
To: ra...@googlegroups.com

bootstrap_jplace.sh

Vincent Carrier

unread,
Oct 17, 2018, 5:15:07 AM10/17/18
to ra...@googlegroups.com

Hi,

 

Actually I am ending on errors where the NodeID extracted doesn’t correspond to the original NodeID. It also collects one more NodeID than a bootstrap value. It doesn’t appear to be picking the right nodeID or ItOL is not understanding the same NodeID. Could that be possible?

 

                       Vincent Carrier

Lucas Czech

unread,
Oct 18, 2018, 8:01:20 AM10/18/18
to ra...@googlegroups.com, Vincent Carrier

Hi Vincent,

I am not sure whether I understand what the script is supposed to do. Jplace does not have NodeID's, but uses curly brackets {} to denote edge numbers, which is a concept described in the jplace paper (https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0031009). From what the script looks like, it extracts these edge nums, and calls them NodeIDs. This might work, but still smells like trouble. Mapping edges to nodes in a tree is only stable for fixed rootings, at even then, might cause problems (https://academic.oup.com/mbe/article/34/6/1535/3077051).

As for the correspondence of NodeIDs to original ones: Firstly, are you sure that you use the same reference tree all the time (identical rooting, identical topology)? If so, this comment from the script might explain what is happening there:

#nodeID2 is the nodeID + 1, this ensures the bootstrap labels are consistent with those produced from iTOL automatically on the reference tree. To use the true nodeiDs replace nodeID2 with nodeID the the paste command.

Maybe this can help you track the issue. Or try to ask the original author of the script directly.

Lucas

Reply all
Reply to author
Forward
0 new messages