The followings are some of the problems you might run into when running PhyloNet:
Outdated Java version
Exception in thread "main" java.lang.UnsupportedClassVersionError: edu/rice/cs/bioinfo/programs/phylonet/Program : Unsupported major.minor version 51.0
Solution: Update your Java to 1.7.0 or later
- To check your Java version, type "java -version" on your command line.
- To download Java 1.7, please go to website http://www.java.com/en/download/.
- To link to the new downloaded Java 1.7, for mac, try these two commands from command line:
sudo rm /usr/bin/java
sudo ln -s /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin
Wrong format of gene trees
If your gene trees have support values as node labels, PhyloNet cannot read them correctly. See Rich Newick Format for the format of phylogenies that PhyloNet reads. For example, if your gene tree is (((A:1.0,B:1.0)100:1.0,(C:1.0,D:1.0)100:1.0)90:1.0,E:1.0), PhyloNet will read the support values as the names of nodes so that you will get error indicated below
Duplicate node 100
Solution: Download the executable TreeConversion.jar and run it on your gene trees
TreeConversion.jar runs from command line as follows. It takes two parameters, including inputFile which contains your gene trees and outputFile which is the file for the resulting gene trees.
>java -jar PATH/TreeConversion.jar inputFile outputFile
Not enough memory
Some commands require a large amount of memories, like InferNetwork_ML. If your dataset is large, you might run into memory issue indicated below
java.lang.OutOfMemoryError: Java heap space
Solution: Increase the memory by using -Xmx
When you launch PhyloNet from command line, add -Xmx followed by the memory size you want to allocated to Java. For example, if you want to increase the memory to 4G for running PhyloNet, run the following command
>java -jar -Xmx4G PATH/jar/PhyloNet_X.Y.Z.jar script.nex