[Phylobase-devl] Future plotting functions
Peter Cowan
pdc at berkeley.edu
Thu Jun 12 22:53:23 CEST 2008
Hi all,
As you know I've been working on writing some native plotting code for
phylobase. So far most of my effort has been directed toward getting
ape style plotting in grid. This has already been done[^1].
I'm curious to here what features people would like to see in plotting
functions as this is likely to be the last blank slate we have for a
while. I'm already planning on adding the ability to make arbitrary
graphs with tip data (e.g. histograms) at each tip. What else would
you like to see?
I had not planned on trying to add radial and fan plotting (these are
available in ape) does anyone use these?
One thing that has been discussed previously is a desire to plot
singleton nodes. Steve and I explored this yesterday and it is already
possible, though you need to proceed carefully. As far as we could
tell there is no way generate ape phylo objects with singletons, so
you must make it by hand. The issue is that if you don't update the
other data with the phylo object (specifically the Nnode, I think) the
command reorder(foo, 'pruningwise') will hang. I haven't had a chance
to look into the c code that causes this hang. The good news is that
correct values of Nnode can be enforce with phylobase (though I'm not
sure why we store it, is it tricky for us to calculate form the matrix?)
This code will make a 'safe' phylo object.
require(ape)
foo <- rtree(3)
foo$edge <- rbind(foo$edge[1:3, ], c(4, 6), c(6, 3))
foo$Nnode <- 3
foo$edge.length <- c(foo$edge.length, 0.4)
foo$node.label <- c("one", "two", "three")
This still won't plot because of a test in plot.phylo so, you'll need
to:
edit(plot.phylo)
comment out lines 13 & 14 and reload the code, now plot.phylo(foo)
should work.
Cheers
Peter
[1.] look at the plot.phylo.R file in the misc folder of the pdcgsoc
branch. You'll need to load the whole file into R. So far it works
with ape phylo objects, but soon phylo4 files will work as well.
More information about the Phylobase-devl
mailing list