[Phylobase-devl] reorder in ape and phylobase

Peter Cowan pdc at berkeley.edu
Sun Jul 27 22:12:35 CEST 2008


Hi all,

I'm trying to write some reorder functions for phylo4 and phylo4d
objects, similar to what ape already has.  Unfortunately, I've found
that it is difficult to keep the names straight.  Particularly the
node names.

Right now there are two different label slots, one for tips and one
for nodes, this follows the ape convention.  I recommend combining
them into one slot that is in the same order as the edge matrix.  Any
objections to this?  Any volunteers to do it?

Otherwise it's difficult to track where a particular node label
belongs, see the following example from ape.

Peter

# get a tree
foo <- rcoal(5)

# reorder in two different ways
bar <- reorder.phylo(foo, order = 'cladewise')
xan <- reorder.phylo(foo, order = 'pruningwise')

# add node labels
bar$node.label <- letters[1:4]
xan$node.label <- letters[1:4]

# the labels plot in the same places, even though they should
# have referenced different nodes, as the two trees were in different order
# either that ape has an undocumented required node order
plot(bar, show.node.label = T)
plot(xan, show.node.label = T)


More information about the Phylobase-devl mailing list