Repository navigation
Issues
Recently come across a problem with the Rcpp package. This package allows R and C (a different more powerful programming language) to communicate. A recent update to this package means when you're installing homoplasyFinder it will try and update Rcpp. I was getting the following error:
Cannot remove prior installation of package 'Rcpp'
To fix it you need to locate this package folder on your computer, remove the folder, and re-install the package.
You can use .libPaths() to find out where your R packages are installed.
Ideally you should remove the Rcpp package and any other packages that rely on it (such as ape). Then you can re-install all the packages you deleted by typing:
install.package("packageName")
rJava is an R package that is used to access HomoplasyFinder's java code. It is quite a temperamental R package. If you have problems getting my package to work try:
- Updating your Java jdk to >10.0.1 (http://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html)
- Delete Java jdk from previous versions
- Reconfigure R to use new Java version, by running this in the terminal:
R CMD javareconf
- Re-install rJava from source using:
install.packages("rJava", type = "source")
- Run the following code in terminal (for OSX):
sudo ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib
Some useful help information:
- https://stackoverflow.com/questions/26948777/how-can-i-make-rjava-use-the-newer-version-of-java-on-osx
- https://www.r-statistics.com/2012/08/how-to-load-the-rjava-package-after-the-error-java_home-cannot-be-determined-from-the-registry/
- http://spartanideas.msu.edu/2015/06/27/the-rjava-nightmare/
- https://stackoverflow.com/questions/30738974/rjava-load-error-in-rstudio-r-after-upgrading-to-osx-yosemite/31039105#31039105
If all the above fails, don't lose hope :-). You don't need rJava installed, you can run HomoplasyFinder using the runHomoplasyFinderJarTool(). runHomoplasyFinderJarTool() runs the Java application directly and therefore doesn't require rJava.
If you running HomoplasyFinder on a really large dataset and you run into a heap space error like this:
java.lang.OutOfMemoryError: Java heap space
A heap space error occurs when HomoplasyFinder uses more memory than was assigned to it. You'll need to change the maximum heap size limit using the -Xmx argument. In the command line use:
java -Xmx4000m -jar HomoplasyFinder.jar
to change it to 4GB. If you're in R, you'll need to restart your session and add the following at the top of your script before loading any packages:
options(java.parameters = "-Xmx4000m")
Polytomies in a phylogeny are where an internal node in a phylogeny has more than two sub-nodes. HomoplasyFinder is designed to run with a fully resolved bifurcating phylogentic trees, where all internal nodes have two sub-nodes. If polytomies are present in the phylogeny, the following diagram illustrates how HomoplasyFinder handles them:
