figtree icon indicating copy to clipboard operation
figtree copied to clipboard

Problem rendering trees with node labels (with non-alphanumerics?)

Open GoogleCodeExporter opened this issue 10 years ago • 6 comments

What steps will reproduce the problem?
1. Load the attached tree file.
2.
3.

What is the expected output? What do you see instead?

The tree should appear in the FigTree viewer. Instead, the program asks what 
the user node labels should be called (as it should) and then nothing further 
happens.

What version of the product are you using? On what operating system?

Version 1.4.0 on Mac OS 10.8.2.

Please provide any additional information below.

Removing all the < signs and the label n/a in the tree description will cause 
the file to load properly; removing only one class or the other will not. At 
first, I though it was a general problem with having non-alphanumerics in the 
node labels; however, other similar (but smaller) test trees made by hand work 
fine. Only larger trees like this seem to fail.

Original issue reported on code.google.com by [email protected] on 12 Feb 2013 at 7:57

Attachments:

GoogleCodeExporter avatar Mar 15 '15 10:03 GoogleCodeExporter

At the moment FigTree assumes node labels in Newick/Nexus trees are numerical. 

Original comment by [email protected] on 7 Jun 2013 at 3:57

  • Changed state: Accepted
  • Added labels: v1.4, Milestone-Release1.4.1

GoogleCodeExporter avatar Mar 15 '15 10:03 GoogleCodeExporter

Original comment by [email protected] on 7 Jun 2013 at 3:57

GoogleCodeExporter avatar Mar 15 '15 10:03 GoogleCodeExporter

This occurs because there is a "<1" value for one or more of the nodes. The 
temporary fix is to disallow these or remove them.

Original comment by [email protected] on 14 Jun 2014 at 11:50

GoogleCodeExporter avatar Mar 15 '15 10:03 GoogleCodeExporter

Original comment by [email protected] on 14 Jun 2014 at 2:59

  • Added labels: Milestone-Release1.4.2
  • Removed labels: Milestone-Release1.4.1

GoogleCodeExporter avatar Mar 15 '15 10:03 GoogleCodeExporter

Original comment by [email protected] on 4 Jul 2014 at 8:07

  • Added labels: Priority-Low, Milestone-Release1.4.3
  • Removed labels: Priority-Medium, Milestone-Release1.4.2

GoogleCodeExporter avatar Mar 15 '15 10:03 GoogleCodeExporter

The issue is the bootstrap values are not strictly numerical (includes 'n/a' and '<1' etc. May need to allow alphanumerical labels.

It is throwing an exception - Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String at java.lang.String.compareTo(String.java:111) at java.util.TreeMap.put(TreeMap.java:568) at java.util.TreeSet.add(TreeSet.java:255) at figtree.treeviewer.decorators.DiscreteColourDecorator.setAttributes(DiscreteColourDecorator.java:107) at figtree.treeviewer.decorators.ColourDecorator.(ColourDecorator.java:54) at figtree.treeviewer.decorators.DiscreteColourDecorator.(DiscreteColourDecorator.java:88) at figtree.treeviewer.decorators.HSBDiscreteColourDecorator.(HSBDiscreteColourDecorator.java:61) at figtree.treeviewer.AttributeColourController.getDecoratorForAttribute(AttributeColourController.java:171) at figtree.treeviewer.AttributeColourController.getColourDecorator(AttributeColourController.java:142) at figtree.treeviewer.painters.LegendPainterController$1.attributeComboChanged(LegendPainterController.java:106) at figtree.treeviewer.painters.AttributeComboHelper.fireAttributeSelectionChanged(AttributeComboHelper.java:293) at figtree.treeviewer.painters.AttributeComboHelper.access$200(AttributeComboHelper.java:46) at figtree.treeviewer.painters.AttributeComboHelper$2.actionPerformed(AttributeComboHelper.java:141)

rambaut avatar Oct 04 '16 13:10 rambaut