Finding out-group in unrooted tree
the fact is that the present upgma tree as a midpoint rooting here, corresponding to node 46.

getRoot(upgma.a)


so for this kind of tree, I recommend you to use the midpoint() rooting function.

pars.a &lt;- optim.parsimony(upgma.a, a.phydat)
pars.a&lt;-acctran(pars.a, a.phydat)
plot(midpoint(pars.a))