This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Visualize Tree In Phylobayes

Hi I am using Phylobayes and I need to visualize the .con.tree file after using the READBP command How canI visualize the tree in a phylogenetic manner?

tree visualization

To which format does Phylobayes print out the trees? Is it newick format?

1 answer

I was having the same problem. Here is how I solved it:

  1. Set the proper working directory where your tree is located:

    setwd("~/Desktop/tree_here/")

  2. load Ape:

    library(ape)

  3. Read the tree into R using Ape:

    tree <- read.tree("dayhoff_bpcomp.con.tre")

  4. Write the tree to an output file using Ape:

    write.tree(tree, file = "tree.newick.tre")

I'm not sure why this works, as I cannot see any meaningful difference between the original tree and tree.newick.tre, they even have the same number of characters! However, once I went through these steps, figtree had no problem opening the tree.

Log in to answer this question.