Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree imports fail with trailing comment #758

Closed
shawnlaffan opened this issue May 7, 2020 · 1 comment
Closed

Tree imports fail with trailing comment #758

shawnlaffan opened this issue May 7, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@shawnlaffan
Copy link
Owner

( First reported on the mailing list: https://groups.google.com/forum/#!topic/biodiverse-users/kvjTV7PLRtI )

Attempts to import trees in newick format with trailing comments fail.

The error is coming from the tabular tree import method, which is the final fallback method if the nexus and newick methods fail.

The workaround for now is to delete the trailing comment.

Example tree:

((((('2500000:1500000':0.333333333333333,'2500000:500000':0.333333333333333):0.172619047619048,'3500000:500000':0.505952380952381):0.273102521758436,('3500000:1500000':0.379310344827586,'3500000:2500000':0.379310344827586):0.39974455788323):0.13761176395585,'1500000:1500000':0.916666666666667):0.0156084656084655,'3500000:3500000':0.932275132275132):0[trailing comment]

Full error stack:

Unable to import data:
Can't use an undefined value as an ARRAY reference at C:\biodiverse\lib/Biodiverse/ReadNexus.pm line 447, <$io> line 1.

Trace begun at C:\biodiverse\lib\Biodiverse\ReadNexus.pm line 112
Biodiverse::ReadNexus::import_data('Biodiverse::ReadNexus=HASH(0x17860c58)', 'file', 'C:\biodiverse\t\trailing_comment.tre') called at C:\biodiverse\lib\Biodiverse\GUI\PhylogenyImport.pm line 119
eval {...} at C:\biodiverse\lib\Biodiverse\GUI\PhylogenyImport.pm line 119
Biodiverse::GUI::PhylogenyImport::run('Biodiverse::GUI::GUIManager=HASH(0x7674240)') called at C:\biodiverse\lib\Biodiverse\GUI\GUIManager.pm line 687
eval {...} at C:\biodiverse\lib\Biodiverse\GUI\GUIManager.pm line 687
Biodiverse::GUI::GUIManager::do_add_phylogeny('Biodiverse::GUI::GUIManager=HASH(0x7674240)') called at C:\biodiverse\lib\Biodiverse\GUI\Callbacks.pm line 64
eval {...} at C:\biodiverse\lib\Biodiverse\GUI\Callbacks.pm line 62
Biodiverse::GUI::Callbacks::__ANON__('Gtk2::Action=HASH(0x11761910)', undef) called at C:\biodiverse\bin\BiodiverseGUI.pl line 134
eval {...} at C:\biodiverse\bin\BiodiverseGUI.pl line 134

@shawnlaffan shawnlaffan added the bug label May 7, 2020
@shawnlaffan shawnlaffan added this to the Release_4.0 milestone May 7, 2020
@shawnlaffan shawnlaffan self-assigned this May 7, 2020
shawnlaffan added a commit that referenced this issue May 7, 2020
@shawnlaffan
Copy link
Owner Author

This will actually affect any comment block that does not use json-like formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant