jeetsukumaran / DendroPy

A Python library for phylogenetic scripting, simulation, data processing and manipulation.
https://pypi.org/project/DendroPy/.
BSD 3-Clause "New" or "Revised" License
205 stars 63 forks source link

quote_underscores argument unrecognized #172

Closed davidrasm closed 11 months ago

davidrasm commented 1 year ago

Using version 4.6.1 it appears that the quote_underscores argument is no longer recognized by the tree write and as_string methods.

For example using: print(tree.as_string('newick', quote_underscores=False))

I get: TypeError: Unrecognized or unsupported arguments: {'quote_underscores': False}

mmore500 commented 11 months ago

Hi @davidrasm-

The functionality is still available, but the kwarg has changed to unquoted_underscores (which you would want to set True in this case). It looks like there was supposed to be a mechanism to give you a more helpful error message

'quote_underscores' is no longer supported: Use 'unquoted_underscores' instead

but it didn't dispatch because of a typo in legacy kwarg recognition. Fixed in c31c1d9!

You can find details about the kwarg options for newick as_string here: https://dendropy.readthedocs.io/en/main/schemas/newick.html?highlight=newick#tree-as-string