Creating PDF from the command line for a BIG (25,000) tree

105 views
Skip to first unread message

Simon Uribe-Convers

unread,
Sep 20, 2017, 3:18:34 PM9/20/17
to FigTree Discussion
Hi all, 

I have a large tree of ~25,000 tips that I want to create a multipage pdf for. I know that FigTree doesn't create this kind of files but it does create very long pdf files that one can split into multiple pages later. Because my tree is so large, it takes a long time for anything to happen in FigTree, e.g., ordering the nodes, transforming branches, so I want to do it on the command line. I found a similar thread (here) specifying that you need to add a "FigTree Block" to your nexus file so that any modifications you want to make are taken into account. Then you can simply export a pdf file from the command line with: `java -jar figure.jar -graphic PDF infield.tre outfield.pdf`. 

I tried this with a small tree and it works great, however, it does not work with my large tree. The "FigTree Block" is there but if I try opening the file it's ignored. If I try to export a pdf from the command line, the program crashes with the following error:

--
Exception in thread "main" 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(Unknown Source)
at figtree.treeviewer.decorators.ColourDecorator.<init>(Unknown Source)
at figtree.treeviewer.decorators.DiscreteColourDecorator.<init>(Unknown Source)
at figtree.treeviewer.decorators.HSBDiscreteColourDecorator.<init>(Unknown Source)
at figtree.treeviewer.AttributeColourController.getDecoratorForAttribute(Unknown Source)
at figtree.treeviewer.AttributeColourController.getColourDecorator(Unknown Source)
at figtree.treeviewer.painters.LegendPainterController$1.attributeComboChanged(Unknown Source)
at figtree.treeviewer.painters.AttributeComboHelper.fireAttributeSelectionChanged(Unknown Source)
at figtree.treeviewer.painters.AttributeComboHelper.access$200(Unknown Source)
at figtree.treeviewer.painters.AttributeComboHelper$2.actionPerformed(Unknown Source)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1258)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:586)
at figtree.treeviewer.painters.AttributeComboHelper$1.treeChanged(Unknown Source)
at figtree.treeviewer.DefaultTreeViewer.fireTreeChanged(Unknown Source)
at figtree.treeviewer.DefaultTreeViewer.showTree(Unknown Source)
at figtree.treeviewer.ExtendedTreeViewer.showTree(Unknown Source)
at figtree.treeviewer.DefaultTreeViewer.setTrees(Unknown Source)
at figtree.application.FigTreeApplication.createGraphic(Unknown Source)
at figtree.application.FigTreeApplication.main(Unknown Source)
--

Does anyone have an idea of how to get this to work? 

Thanks,
Simon 

Brad Ruhfel

unread,
Sep 20, 2017, 3:26:14 PM9/20/17
to figtree...@googlegroups.com

Simon,

 

Have you tried Paup? I haven’t used it in a while but I know it had a good function to split trees across several pages. Not sure about a tree that large though.

 

Hope all is well,

 

Brad

--
You received this message because you are subscribed to the Google Groups "FigTree Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to figtree-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Simon Uribe-Convers

unread,
Sep 20, 2017, 3:38:47 PM9/20/17
to figtree...@googlegroups.com
Hi Brad,

No, I haven’t tried PAUP but just by searching the manual and looking at the available commands once I started the program, only the “Export” command seems to be useful. The problem is that it will only export trees in other phylogenetic formats (e.g., PHYLIP, RelPHYLIP, FASTA, Hennig, TabText, Text, Nexus, MEGA)!

Do you, or anyone else, knows about this functionality?

Cheers,
Simon 

You received this message because you are subscribed to a topic in the Google Groups "FigTree Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/figtree-discuss/FJSDE_gPtvM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to figtree-discu...@googlegroups.com.

Brad Ruhfel

unread,
Sep 20, 2017, 3:43:39 PM9/20/17
to figtree...@googlegroups.com
Well the GUI does it!

Simon Uribe-Convers

unread,
Sep 20, 2017, 4:03:36 PM9/20/17
to figtree...@googlegroups.com
You are right, Brad, the GUI does have that functionality! But my tree exceeds the maximum number of taxa (16,000) allowed by PAUP, ugh.

Thanks though, this was a great lead and hopefully helpful for someone else!

Simon 
Reply all
Reply to author
Forward
0 new messages