Thanks so much. That’s perfect. I will update my question at https://www.biostars.org/p/294222/ so it is documented somewhere.
Cheers Yan On 20 Jan 2018, at 16:08, Emmanuel Paradis <emmanuel.para...@ird.fr> wrote: > Hi, > > To get a tree with a basal multichotomy as a rooted tree, you have to set its > root edge: > > R> tr <- read.tree(text = "(A,B,(C,D));") > R> is.rooted(tr) >  FALSE > R> tr$root.edge <- 0 > R> is.rooted(tr) >  TRUE > > This could be done directly in the Newick string: > > R> tr <- read.tree(text = "(A,B,(C,D)):0;") > R> is.rooted(tr) >  TRUE > > Best, > > Emmanuel > > Le 19/01/2018 à 23:08, Yan Wong a écrit : >> Hi >> I have a set of rooted trees, some of which have polytomies at the root, like >> (A,B,(C,D)); >> ((A,B),(C,D)); >> These are not treated as rooted by default, so I have tried to root them >> using >> root(tree, node = Ntip(phy) + 1, resolve.root = TRUE), but this gives an >> error, explained here: >> https://email@example.com/msg03805.html >> Note that in my case there is no particular reason to specify either A, B, >> or (C,D) as an outgroup >> I should explain that what I am trying to do is to calculate distance >> metrics between these trees (using metrics that are valid with polytomies, >> such as the KC metric), such that the pairwise distances between (A,B,(C,D)) >> and (B,A,(C,D)) and ((C,D), B, A) etc are all 0, but the distance between, >> say, (A,B,(C,D)) and ((A,B),(C,D)) or perhaps (A,C,(B,D)); is not zero. >> So how can I specify a polytomy at the root, with the tree format used in R? >> Cheers >> Yan Wong >> Oxford >> _______________________________________________ >> R-sig-phylo mailing list - Rfirstname.lastname@example.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo >> Searchable archive at http://email@example.com/ >> Pour nous remonter une erreur de filtrage, veuillez vous rendre ici : >> http://f.security-mail.net/304anPlLmqF _______________________________________________ R-sig-phylo mailing list - Rfirstname.lastname@example.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://email@example.com/