Visualize Raxml 8 Bootstrap Tree
1
1
Entering edit mode
10.2 years ago
Pappu ★ 2.1k

I am trying to visualize the tree using ete2 and figtree. But the programs don't seem to understand the bootstrap value given in RAxML_bipartitionsBranchLabels.test as branch_len[bootstrap value] : 0.44849636763673333961[20]

Could you tell me how can I visualize the trees with support values?

ete2 figtree raxml bootstrap • 10k views
ADD COMMENT
4
Entering edit mode
10.2 years ago
jhc ★ 3.0k

Three quick solutions:

1. ETE comes with a command line script for quick tree visualization called 'ete2' that should be in your path. Try the --raxml option.

2. Convert raxml newick file into the the standard format using regular expressions. Something like this should work:

cat RAxML_bipartitionsBranchLabels.mytree
'(A:1, (B:1, (C, D):0.44849636763673333961[20]):0.44849636763673333961[20]);'

cat RAxML.bipartitions | perl -p -i -e 's/:(\d+\.\d+)\[(\d+)\]/$2:$1/g'
(A:1, (B:1, (C, D)20:0.44849636763673333961)20:0.44849636763673333961);

3. Latest versions of RAxML produce a newick file with the correct standard format. You should see something like RAxML_bipartitionsBranchLabels.mytree and RAxML_bipartitions.mytree. They are the same tree, and the former has the correct format

ADD COMMENT
0
Entering edit mode

Nice solution. Just for reference, you don't need cat in the second command, perl will take the file from stdin or as an argument.

ADD REPLY
0
Entering edit mode

I tried this but I'm still having trouble with ete2. Here's the script I'm using:

from ete2 import Tree, faces, AttrFace, TreeStyle
t1=Tree('/home/kmkocot/Desktop/ete_test/RAxML_bipartitions.Best_425', format=0)
ancestor = t1.get_common_ancestor("PCAU","DMEL","DPUL")
t1.set_outgroup(ancestor)
print t1
print
print "Entoprocta"
print t1.check_monophyly(["NLAP", "GEBO"], "name", ignore_missing=False)
print t1.support

and here's the output I'm getting:

      /-PCAU
   /-|
  |  |   /-SAME
  |   \-|
  |     |   /-DPUL
  |      \-|
  |         \-DMEL
  |
  |      /-SAGI
  |     |
  |     |         /-SMAN
  |   /-|      /-|
--|  |  |   /-|   \-TPIS
  |  |  |  |  |
  |  |  |  |   \-SMED
  |  |   \-|
  |  |     |      /-BPLI
  |  |     |   /-|
  |  |      \-|   \-ARIC
  |  |        |
  |  |         \-GPAR
  |  |
  |  |   /-BNER
  |  |  |
   \-|  |            /-LPEC
     |  |         /-|
     |  |        |   \-LVIV
     |  |      /-|
     |  |     |  |   /-PCER
     |  |     |   \-|
     |  |   /-|      \-BGRA
     |  |  |  |
     |  |  |  |   /-MEGA
     |  |  |   \-|
     |  |  |      \-MACR
     |  |  |
     |  |  |               /-GPYR
     |  |  |            /-|
      \-|  |           |   \-NANO
        |  |         /-|
        |  |        |  |   /-HPSI
        |  |        |   \-|
        |  |      /-|      \-LCAL
        |  |     |  |
        |  |     |  |   /-PVAN
        |  |     |   \-|
        |  |     |      \-PARC
        |  |     |
        |  |     |            /-PPER
        |  |     |         /-|
        |  |     |        |   \-MGRO
        |  |     |      /-|
        |  |     |     |  |   /-CMAR
        |  |   /-|     |  |  |
         \-|  |  |     |   \-|      /-LLON
           |  |  |     |     |   /-|
           |  |  |     |      \-|   \-LLAC
           |  |  |   /-|        |
           |  |  |  |  |         \-LRUB
           |  |  |  |  |
           |  |  |  |  |      /-CLIN
           |  |  |  |  |   /-|
           |  |  |  |  |  |   \-CHON
           |  |  |  |   \-|
           |  |  |  |     |   /-TPO1
           |  |   \-|      \-|
           |  |     |         \-TPO2
           |  |     |
           |  |     |   /-PAGA
           |  |     |  |
           |  |     |  |            /-PGOU
           |  |     |  |         /-|
           |  |     |  |        |   \-CTOR
           |  |      \-|      /-|
           |  |        |     |  |   /-HROB
           |  |        |     |   \-|
           |  |        |   /-|      \-CTEL
           |  |        |  |  |
            \-|        |  |  |   /-BPRO
              |         \-|   \-|
              |           |      \-PLAM
              |           |
              |           |   /-ASUC
              |            \-|
              |               \-GDIB
              |
              |            /-LASE
              |         /-|
              |      /-|   \-LRUG
              |     |  |
              |     |   \-ROLI
              |   /-|
              |  |  |      /-SCLE
              |  |  |   /-|
              |  |  |  |   \-PCAL
              |  |   \-|
              |  |     |   /-ACRA
              |  |      \-|
              |  |        |   /-NCAR
              |  |         \-|
              |  |            \-MSCH
              |  |
              |  |      /-LHYA
               \-|   /-|
                 |  |  |   /-OVUL
                 |  |   \-|
                 |  |     |   /-DGIG
                 |  |      \-|
                 |  |        |   /-SESC
                 |  |         \-|
                 |  |            \-SLES
                 |  |
                 |  |            /-SVEL
                 |  |         /-|
                 |  |        |   \-ETEN
                 |  |        |
                  \-|      /-|      /-VLIE
                    |     |  |   /-|
                    |     |  |  |   \-RPHI
                    |     |   \-|
                    |     |     |   /-MEDU
                    |   /-|      \-|
                    |  |  |        |   /-CGIG
                    |  |  |         \-|
                    |  |  |            \-PFUC
                    |  |  |
                    |  |   \-NPER
                    |  |
                    |  |         /-PPUL
                     \-|      /-|
                       |     |  |   /-LGIG
                       |     |   \-|
                       |   /-|      \-PVUL
                       |  |  |
                       |  |  |   /-HRUF
                       |  |   \-|
                       |  |     |   /-ACAL
                        \-|      \-|
                          |        |   /-NLAP
                          |         \-|
                          |            \-CFOR
                          |
                          |   /-GEBO
                           \-|
                             |   /-ETET
                              \-|
                                 \-GTOL

Entoprocta
(True, 'monophyletic')
Traceback (most recent call last):
  File "ete2_script.py", line 11, in <module>
    print t1.support("NLAP", "CFOR", "ACAL")
TypeError: 'float' object is not callable
ADD REPLY

Login before adding your answer.

Traffic: 1714 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6