[Phylobase-devl] phylo vs phylo4 'order' attribute conflict

Jim Regetz regetz at nceas.ucsb.edu
Tue Apr 14 02:14:13 CEST 2009


Hi all,

I'd be happy to enter this via the R-forge bug tracker instead, but it 
doesn't look like there is a lot going on there so I'll start out on the 
mailing list.

When it exists, the 'order' attribute of a phylo object can be either 
"cladewise" or "pruningwise". This attribute is preserved when coercing 
from phylo to phylo4. However, valid phylo4 objects can only take on the 
order values "unknown", "preorder", or "postorder", as specified in the 
built-in vector phylo4_orderings. Hence the following error:

 > data(bird.families)
 > tr <- reorder(bird.families)
 > as(tr, "phylo4d")
Error in checkTree(object) :
   unknown order: allowed values are unknown,preorder,postorder

I suppose the coercion method should either ignore the phylo order 
attribute if it isn't relevant for phylo4 objects, or deal with it in a 
way that doesn't conflict with the phylobase usage of this attribute.

On a related note, I believe phylobase::subset always fails with ape 
2.3, because the newly revised ape::drop.tip (called internally by 
subset) explicitly reorders trees as cladewise, creating an order 
attribute that phylobase currently regards as invalid.

FYI, I'm using ape 2.3 and the r426 build of phylobase.

Thanks,
Jim


More information about the Phylobase-devl mailing list