R Hackathon 1/Mesquite-R Integration SG

From Phyloinformatics
Revision as of 19:52, 16 January 2008 by Hilmar (talk)
Jump to: navigation, search
  • Participants: Hilmar Lapp, Wayne Maddison
  • Targets
    1. Mesqite->R: 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
    2. R->Mesquite: Make Mesquite classes, methods, and data objects usable from within R in a transparent fashion
      • Methods that execute within Mesquite appear 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., as())
  • Accomplishments
    1. Mesquite->R:
      • ...
    2. R->Mesquite:
      • 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 as.matrix() and as.phylo() functions.
      • 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 that implement NumberForTreeAndCharacter and ancestral state reconstruction. to be called.
  • 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?).
    • 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).