R Hackathon 1/Programming Goals
End-user goals are on a separate page.
Goals from a programmer perspective
Creating an interoperable data representation in RThere are many ways to represent trees in R, and not all of them can be converted from one to the other (see diagram of possible conversions).
Benefits if such a standard is implemented:
- We should be able to load a tree and character data from a NEXUS file (see Supporting NEXUS and NEXUS Specification) and then use functions from various packages without requiring conversion of the objects holding the tree(s) and data.
- New R packages for comparative methods will use this standard.
- Existing packages will ideally be modified to meet this standard, but will hopefully be able to at least easily convert to and from this standard from and to their internal representations. Alternatively, we could create a package or modify an existing package to easily convert from and to all the currently-implemented tree and data representations for comparative methods.
- branch lengths
- tree weights
- information about ancestral state reconstructions/assignments
The page for working on the standards is here.
We have a test set of sample trees and datasets which contain various formats for input (trees with and without branch lengths, rooting, labels, etc.) useful in evaluating loading and representation of these data in individual packages; the following information is summarized here:
- document the internal representation of the files from each package, as well as notes regarding the procedure for loading the files (see the 'phylo' class (pdf) or the scheme for coding nucleotides (pdf) in APE as examples)
- what was lost (for example, is it clear which trees are rooted and unrooted?)
Consolidate redundant and fill in missing functionality
We have compiled all the help documents for functions related to comparative methods in R into a single searchable, sortable table, with all the functions categorized into major and minor types. This may help, for example, find all the relevant functions for plotting trees from various packages. If your package is not here yet, and you're comfortable releasing info on its functions, please email Brian O'Meara.
We also have overviews of the relevant packages here.
Interfacing with other programs or architectures
R can call external programs and scripts (see R manual). Currently, those comparative methods and related approaches that are not present in R are generally implemented in standalone programs (commonly written in C or C++; see Felsenstein's list of relevant programs) or as modules for Mesquite (see overview of Mesquite's features).
Developing the ability for users to run such analyses from within R will reduce the amount of re-coding of particular methods required. Several relevant programs (PAUP, MrBayes, Mesquite, r8s, Brownie, others?) can be run by passing them NEXUS files with trees, data, and a block of commands and their output(s) can be specified; other programs can be batched, but not directly using NEXUS files (PHYLIP programs, BayesTraits).
- Mesquite calling R modules.
- See JRI for Java -> R calls
- R calling Mesquite modules (see somewhat outdated documentation for developing for Mesquite)
- See rJava for R -> Java calls
- R calling existing software as external programs (PAUP? MrBayes? others?)
See end user goals for a discussion of missing functionality.
Note a page of extensive S4 info (mostly as pdfs) here.