Question: Any software to view newick/nexus trees command line?
1
gravatar for Adrian Pelin
4.4 years ago by
Adrian Pelin2.2k
Canada
Adrian Pelin2.2k wrote:

Sorry, not sure if they are called newick or nexus tree formats, but it's the common format outputed by PHYML, MrBayes, etc.

MrBayes outputs a tree at the end of the analysis in the terminal and it looks really good, even has support values. Is there any software that can do that?

Adrian

EDIT: Sorry, forgot to mention silly me, I use CentOS.

cmd phylogeny • 4.4k views
ADD COMMENTlink modified 3.3 years ago by rezam20 • written 4.4 years ago by Adrian Pelin2.2k
4
gravatar for Siva
4.4 years ago by
Siva1.6k
United States
Siva1.6k wrote:

If I understand correctly, you want to view tree as an ASCII art on the command line like this:

You can try Newick utilities that will do this. It seems you can do this in BioPython also.

ADD COMMENTlink written 4.4 years ago by Siva1.6k
3
gravatar for jhc
4.4 years ago by
jhc2.8k
Germany
jhc2.8k wrote:

ETE's get_ascii function provides text-based visualization, allowing also to show internal nodes features. 

from ete2 import Tree
t = Tree("((A, B)Internal_1:0.7, (C, D)Internal_2:0.5)root:1.3;", format=1)
t.add_features(size=4)
print t.get_ascii(attributes=["name", "dist", "size"])
#
#                            /-A, 0.0
#             /Internal_1, 0.7
#            |               \-B, 0.0
# -root, 1.3, 4
#            |               /-C, 0.0
#             \Internal_2, 0.5
#                            \-D, 0.0
#

Check also the upcoming ETE's command line tools, tree view and other tools will be supported:

http://phylohack.wordpress.com/2014/11/27/about-the-upcoming-ete-command-line-tools/

 currently available as beta: https://github.com/jhcepas/ete/releases/tag/latest_beta

UPDATE:

ete3 provides text-based visualization from the command line: 

ete3 view --text MyTreeFile.nw

 

ADD COMMENTlink modified 3.3 years ago • written 4.4 years ago by jhc2.8k

Thanks. You've saved my day.

ADD REPLYlink written 8 months ago by a.zielezinski8.6k
1
gravatar for CraigM
4.4 years ago by
CraigM80
Ireland
CraigM80 wrote:

There are a few open source programs for viewing trees such as treeview.

 

Try this

http://darwin.zoology.gla.ac.uk/~rpage/treeviewx/index.html

 

ADD COMMENTlink written 4.4 years ago by CraigM80
1

I don't think Treeview can show phylogenetic trees in the terminal -- I think it can open a window if prompted.  In any event, I think for a tree viewing program, you can't get any better than FigTree.  I think the original question was for a tree viewer for the command line.  Here's a pretty comprehensive list of tree viewing programs out there: Tree Editors

ADD REPLYlink written 4.4 years ago by Josh Herr5.6k
1
gravatar for Asaf
4.4 years ago by
Asaf5.5k
Israel
Asaf5.5k wrote:

Using dendropy - a python tree manipulating package:

import dendropy

tree = dendropy.Tree.get_from_path('treefile.nwk', 'newick')

print tree.as_ascii_plot()

It can print support values (I didn't have them in my example)

part of my tree (looks better in terminal):

                                                                                                  \--+                       
                                                                                                      |          /------ 509169
                                                                                                      |   /------+            
                                                                                                      |   |      |  /--- 314565
                                                                                                      |   |      \--+         
                                                                                                      |   |         \--- 190485
                                                                                                       \---+                   
                                                                                                           |      /------ 291331
                                                                                                           |  /---+            
                                                                                                           |  |   |  /--- 342109
                                                                                                           |  |   \--+         
                                                                                                           \--+      \--- 360094
                                                                                                              |                
                                                                                                              |      /--- 190486
                                                                                                              \------+         
                                                                                                                     \--- 316273
                                                                                                                               

 

ADD COMMENTlink written 4.4 years ago by Asaf5.5k
0
gravatar for rezam
3.3 years ago by
rezam20
US
rezam20 wrote:

PAUP* can do this, too. After you run it in terminal:

  • >paup> exec <file_containing_nexus_format_of_trees>
  • paup> showtrees n

It will show the n-th tree in the file.

If you are looking for a GUI, Dendroscope is a very nice and fast tree visualization software.


 

ADD COMMENTlink modified 3.3 years ago • written 3.3 years ago by rezam20
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: 1229 users visited in the last hour