Convert between (un)quoted taxon labels
tseemann opened this issue · 4 comments
tseemann commented
Love this tool!
Noticed some tools handle quoites labels in .nwk
But other tools don't
Be good to be able to convert between them
Quoted: ('label1':0.231, ...);
Unquoted: (label1:0.231, ...);`
For the case of a label having a a space (EVIL!)
perhaps allow replacing it with underscore (_
) ?
fredericlemoine commented
Thanks for the suggestion,
You can test gotree rename
--rm-quotes
and --add-quotes
options in the latest v0.4.1a pre-release .
Moreover, for the spaces in node/tip names, would the following command work for you?
gotree rename -e '\s' -b '_' -i tree.nwk
fredericlemoine commented
Hi @tseemann ,
Can I close this issue? Could you test it?
Thanks
lskatz commented
I had the same issue and can confirm that this worked for me when I had single quotes in my file. I do not have the latest alpha version however.
$ gotree version
v0.3.0
$ gotree rename -e "'" -b '' -i simtree.tre.bak > tmp.dnd