Administrators Guide

Using Different Versions of R
Installing GenePattern (version 3.1 and later) installs R 2.5.
-
On Windows, R 2.5 is installed within the GenePattern directory and should not impact other installations of R that may be on your computer.
-
On Mac it is installed in the standard location,
/Library/Frameworks/R.framework/Versions/2.5.
-
Linux users must install R on their own and point the GenePattern installation to the location of R.
The GenePattern modules available in the Broad Institute repository (Modules & Pipelines>Install from repository) all work with R 2.5. However, some GenePattern modules require different versions of R; for example, ExpressionFileCreator v.10 requires R 2.8. Unfortunately, R is not backward compatible. If you simply install and run the latest version of R, modules may fail or (worse) may produce invalid results even though they do not fail.
Defining R in GenePattern
In GenePattern, each module definition includes a command line that runs the analysis program. For an R module, the R version is defined by a command line substitution parameter. For example, the <R> parameter is substituted with the full path to the R 2.0.1 executable. The <R2.5> parameter is substituted with the full path to the R 2.5 executable. Similar parameters are used for other versions of R.
GenePattern version 3.1 and later installs R 2.5 and sets the <R2.5> parameter. If you upgraded from GenePattern 3.0, your GenePattern installation also includes R 2.0.1 and sets the <R> parameter.
Adding More Recent Versions of R to GenePattern
To add a different version of R to your GenePattern installation (for example R 2.8 on Mac OS X, for ExpressionFileCreator v. 10):
-
Install the required version of R, if necessary. This is covered in detail on the R Project home page.
-
Go to http://www.r-project.org/ and select a CRAN mirror.
-
Locate either the source code or the binary for the desired version of R. For a binary installation, look for the subdirectory link labeled 'old', which is towards the bottom of the page.
-
Follow the installation instructions.
-
After you install the correct version of R, in whatever manner makes sense to you, you need to configure GenePattern to use that version of R. This is as simple as adding two new substitution parameters to the server settings.
-
Click Administration>Server Settings and go to the Custom page.
-
Add a setting for R*_HOME and another for R*, replacing the '*' with an actual version number.
-
For R 2.8 on Mac OS X the parameters are:
R2.8_HOME=/Library/Frameworks/R.framework/Versions/2.8/Resources
R2.8=<java> -DR_suppress=<R.suppress.messages.file> -DR_HOME=<R2.8_HOME> -Dr_flags=<r_flags> -cp <run_r_path> RunR |
-
For other platforms, set R2.8_HOME equal to the full path to the installation directory. It must be a directory which contains a 'bin' folder, which contains the 'R' executable.
Special considerations for Mac OS X
Extra steps are required when you install R on Mac OS X from a binary package downloaded from CRAN. When you install R in this manner, you are not able to use more than one version of R at a time. You can only use the most recently installed version of R, even if this happens to be an earlier version of R. You can change the active version of R using the RSwitch GUI (http://r.research.att.com/), but it is not effective for use from GenePattern. As a workaround, you must manually edit the installed executable shell scripts. Replace all hard coded paths to /Library/Frameworks/R.framework/Resources with the actual path to the correct installed version of R. The file r_mac_osx_binary_patches.tar contains patches for modifying various versions of R.
Adding R Version 2.0.1 to GenePattern
There are some GenePattern modules which rely on R version 2.0.1:
-
CoxRegression
-
LogisticRegression
-
MultiplotPreprocess
-
NearestTemplatePrediction
To use these modules on your server you need to add R version 2.0.1.
To add R2.0.1 to your GenePattern installation:
-
Install R2.0.1.
-
In GenePattern, click Administration>Server Settings and go to the Programming Languages page.
-
Set the R 2.0.1 Home parameter to the full path of the R2.0.1 installation. This defines the <R> variable.
-
Click Save to update the GenePattern server configuration.
GenePattern can now run modules written for R2.0.1.
<< Modifying Server Settings
| Up |
Increasing Memory Allocation >>