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

How to handle trees with illegal characters? #138

Open josephwb opened 3 years ago

josephwb commented 3 years ago

Arising from https://github.com/FePhyFoFum/phyx/issues/132

What to do with trees that contain unquoted Nexus ("()[]{}/\,;:=*\'\"`+-<>";) or newick("()[]\':;,") illegal characters? Most times the tree reader will just crash on bad input, although sometimes (like with #132) a corrupted input is produced (without warnings).

It would be nice to be able to detect bad input and report back, but this seems very complicated. Minimally, we could add to the documentation that if errors are encountered, users should first check 1) line endings (gotta be unix) and 2) that labels are compliant.