Date: 2009-08-25 19:35 Sender: Peter Cowan+1 for escalating this.
I'm willing to write a native function to handle this, but I won't be able to do it this week. |
Date: 2009-08-23 17:22 Sender: Ben Bolkermy conclusion so far is that this is totally intentional in ape, a result of resolve.root=TRUE, and I really don't understand what's going on in root() well enough yet. At least one of the NAs is explicit.
I am tempted to "escalate" this feature to a bug, since it's one of the few things I think we would like to resolve before release ... |
Date: 2009-08-22 23:38 Sender: Ben Bolkerdoes this represent a misfeature/bug in ape? if so -- should we harden phylobase, ask Emmanuel to fix ape, or both?
|
Date: 2009-08-21 22:45 Sender: François MichonneauI attached a R object that illustrates the problem. It contains the variable 'step1' which represents the object before being submitted to the function root from ape.
load(file="geoUniqLbl.Rout")
step1$node.label
step2 <- root(step1, node=17, resolve.root=TRUE)
step2$node.label
returns:
[1] "n17" NA "n16" NA "n18" "n19" "n20" "n21" "n22" "n23" "n24" "n25"
[13] "n26" "n27"
There shouldn't be any NA in this vector.
This is with ape 2.3-2 |
Date: 2009-08-21 22:28 Sender: François Michonneauoops... I removed exGeo4 from the examples...but geospiza fails similarly.
The problems comes from the fact that there are NA in the node labels returned by ape's root. |
Date: 2009-08-21 22:22 Sender: Steven KembelHere's one example that wasn't working:
> example(phylo4d)
> rootNode(exGeo4)
> rootNode(exGeo4) <- 17
Error in .createLabels(node.label, ntips = ntips, nnodes = nnodes, type = "internal") :
Number of labels does not match number of nodes.
|
Date: 2009-08-21 22:01 Sender: Ben Bolkerat your convenience, could you post some test cases that don't work?
|
Date: 2009-08-21 21:52 Sender: Steven KembelWrote this code using the ape::root function but it does not work properly for all trees. Trying to figure out why, it may be a problem with phylo<>phylo4 roundtrip or a bug in the ape::root function. Code attached for now. |
Date: 2009-08-18 23:03 Sender: Steven KembelThis will take a fair bit of work.
1) Rerooting a tree requires all internal nodes to be renumbered to respect convention (enforced by checkTree) that root node # = nTips+1.
2) Rerooting a rooted tree will generate unbranched internal nodes - should we collapse these when rerooting (= ape default behaviour)?
For now I suggest we can reroot trees using ape's root function. |