phangorn
phangorn copied to clipboard
unexpected tiplabels behavior using network imported from splitstree
Hello!
I'm trying to plot a network imported from SplitsTree. When I simply plot the network, all tips appear to be labeled.
plot(test2, "2D", show.tip.label = T, edge.width = .5, cex = .5)
However, if I initially omit the tip labels and try to add them back later, some of the tips are skipped. An example node is circled in the plot above.
plot(test2, "2D", show.tip.label = F, edge.width = .5)
tiplabels(pch = 16, col = "red")
The tip originally labeled "E18-338" does not get a red circle.
I've only noticed this with the very shortest of tip edges, but I may have missed other instances.
Is there a workaround? Am I missing something?
I'm using phangorn 2.5.5, R 3.6.1, and SplitsTree 4.15.1 on a Mac. The network file I'm using is attached.
Thanks for any help, Tim
Well, I solved one of my issues. The workaround is to use the test2$translate$node to identify which nodes correspond to tip termini and then use the nodelabels() function to label them. Still, it's unclear why tiplabels() would not just do this for you.
Thanks again!