R Hackathon 1/Mesquite-R Integration SG
From NESCent Informatics Wiki
(Redirected from R Hackathon 1/Mesquite-R communication SG)
- Enable R packages, and their functions to be called from within Mesquite, with an R package appearing as a choice for the proper operation in the Mesquite UI
- R->Mesquite: Make Mesquite classes, methods, and data objects usable from within R in a transparent fashion
- Methods that execute within Mesquite can be used as otherwise "normal" R functions and objects, and expect "normal" R objects as arguments
- Mesquite data and result objects appears transparently as "normal" R objects, or can be converted to such using standard R facilities (e.g.,
- Wrapper library (rmLink), external library for supporting R<->Java communication (JRI), example data, folder structure all assembled for download
- Installation (in README included with the download) consists of a series of manual steps, roughly along the following:
- Move rmLink library code to correct location within the Mesquite folder tree
- For non-Mac OSX, download and install JRI. For Mac OSX, move JRI library to correct location within the Mesquite folder tree
- For Mac OSX, edit
- Install at least ape in R.
- With successful installation, APE and GEIGER examples should run.
- Mesquite wrapper library rmLink that simplifies communication with Mesquite and makes result data (trees, matrices, named values) processing more efficient from R.
- Installable package RMesquite that has declared dependencies on rJava (which enables using Java classes from within R) and ape, which are therefore installed too. The package also automatically installs the rmLink Mesquite wrapper library (in Java).
- Ability to convert Newick strings and phylo (package ape) objects to Mesquite Tree objects, and R arrays and matrices to Mesquite character matrices
- Transparently coerce Mesquite Tree and Character data objects to R phylo and matrix objects, using standard
- Read NEXUS files into a Mesquite "Project" and inspect the contents within the project.
- R methods to execute Mesquite's BiSSE likelihood calculation and ancestral state reconstruction methods, with standard R objects as arguments. There are also generic versions that would allow other Mesquite classes to be called that implement
NumberForTreeAndCharacterand ancestral state reconstruction.
Remaining issues & future goals:
- Vignettes and API documentation in RMesquite are still missing.
- Provide coercion of Mesquite Tree and Character data objects to phylo4 and phylo4d S4 classes.
- Provide coercion for Mesquite Project object to an R object or class (e.g., phylo4d?).
- Provide way to inspect the possible options for "Employees" that Mesquite has available to hire by a particular general analysis class, and a way to pass a choice into Mesquite.
- Starting Mesquite from within R is unstable at least on Mac OSX 10.4, but seems to work OK on Windows, and probably also on Mac OSX 10.5. On Mac OSX 10.4, if R crashes it does so soon after Mesquite is started. If it doesn't it usually remains stable. The issue is most likely an AWT thread concurrency problem, despite using the headless version of Mesquite (which in theory should not be using AWT at all).
- R can in fact start up the full GUI version of Mesquite if started from the JGR console instead of the terminal version of R or the regular GUI version. This would allow access to the many sophisticated visualization capabilities of Mesquite.
- Getting Mesquite calling R fully working and & easily installable on Windows and Linux.