parsenexus
doesn't accept TaxaLabels names that begin with integers
#39
Labels
parsenexus
doesn't accept TaxaLabels names that begin with integers
#39
Hello folks, very cool module, thanks for your efforts. Parsing a bunch of heterogeneous nexus files I discovered a couple potential issues, which you can guess from the title. The
parsenexus
function appears to split on integers at the head of taxon names in the TaxaLabels field. It also splits on periods (.
) in taxon names. Within thefunction parsetaxa(token, state, tokens, taxa)
this results in ataxa
dictionary with more entries than are declared in thentaxa
field of the nexus file, raising the warning at line 436.Steps to reproduce:
I updated newick.jl (~line 436) to show the taxa dictionary, so the output of the above call is more informative:
And the result is:
Expects 3 and is getting 5 because
2108_Nesoenas_picturata_Reunion
andAY529948.1
are getting split.I think
ape
doesn't allow integers to lead taxon names either, so maybe this is a feature and not a bug, but I don't think it's a constraint of the nexus format, as other packages will handle this fine (e.g. toytree and dendropy).I can work around it, so not a big deal but thought I'd report it.
Thanks again for all your work.
-isaac
The text was updated successfully, but these errors were encountered: