First, the space and tab before the string was removed
Second, The , and ; symbols were also removed
Last, split the label string with the first space (start from left)
> library(ape)
> read.nexus("./problem.tree.txt")
Phylogenetic tree with 3 tips and 2 internal nodes.
Tip labels:
Tip 1, Tip 2, Tip 3 c
Rooted; includes branch lengths.
If the labels in Translation contain space, the original
read.nexus
will generate an error.The related issue
This issue was fixed following the steps.
First, the space and tab before the string was removed Second, The
,
and;
symbols were also removed Last, split the label string with the first space (start from left)