Question: Visualize Raxml 8 Bootstrap Tree
1
gravatar for Pappu
5.2 years ago by
Pappu1.9k
Pappu1.9k wrote:

I am trying to visualize the tree using ete2 and figree. 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?

• 6.5k views
ADD COMMENTlink modified 4.2 years ago by jhc2.8k • written 5.2 years ago by Pappu1.9k
3
gravatar for jhc
5.2 years ago by
jhc2.8k
Germany
jhc2.8k wrote:

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);
  1. 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 COMMENTlink written 5.2 years ago by jhc2.8k

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 REPLYlink written 5.2 years ago by SES8.2k

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 REPLYlink written 4.4 years ago by kmkocot0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 998 users visited in the last hour