Dear all,

A problem often pointed out with the numbering system of the edge matrix in a tree of class "phylo" is that node numbers are likely to change after tree manipulation. Node labels are here to remedy this, but this element is optional. To allow easy creation of node labels, I'm planning to make a new function makeNodeLabel. The usage of the function is:

makeNodeLabel(phy, method = "number", prefix = "Node")

and the arguments:

phy   an object of class "phylo".

method a character string giving the method used to create the labels. Two choices are possible: "number" and "md5sum".

prefix   the prefix used if method = "number".


Currently two methods are envisaged:

``number''
The labels are created with 1, 2, ... suffixed with the argument prefix; thus the default is to have Node1, Node2, ... Set prefix = "" to have only numbers.

``md5sum''
For each node, the labels of the tips descendant from this node are extracted, sorted alphabetically, and written into a temporary file, then the md5sum of this file is extracted and used as label. This results in a 32-character string which is unique (even accross trees) for a given set of tip labels.


Please send me any suggestion that you may found useful.

EP
--
Emmanuel Paradis
IRD, Montpellier, France
  ph: +33 (0)4 67 16 64 47
 fax: +33 (0)4 67 16 64 40
http://ape.mpl.ird.fr/

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to