FePhyFoFum / phyx

phylogenetics tools for linux (and other mostly posix compliant) computers
blackrim.org
GNU General Public License v3.0
111 stars 17 forks source link

pxrlt and pxrmt doesn't output tip name with "-" correctly #171

Closed fkyeeb closed 2 years ago

fkyeeb commented 2 years ago

for example if the tip name is "Van-royena_castanosperma", the tip name in the output tree will be "'Van-royena castanosperma'". The underscore will be removed and single quotation marks will be added to either side of the name.

josephwb commented 2 years ago

Can you please provide input files and expected output?

josephwb commented 2 years ago

Actually, this is a "feature". Names that contain Nexus-illegal characters (()[]{}/\,;:=*'"`+-<>) should be single-quoted (otherwise it can cause troubles with various Nexus-compliant tree readers). Underscores are considered as space-characters in unquoted labels, and so are replaced by literal spaces in the quoted label.

Does that make sense.

fkyeeb commented 2 years ago

Yes! Thank you. Then what should I do if I would like the tip name to not change after using phyx, when the tip name has to contain Nexus-illegal characters?

josephwb commented 2 years ago

Any name you want to conserve literally, just surround with single quotes. So in your example above, replace:

Van-royena_castanosperma

with

'Van-royena_castanosperma'

and everything should work as expected. Sorry for the headache; some programs are Nexus-compliant, others partially so. :)

fkyeeb commented 2 years ago

Thank you for helping!