$ Installation   [ Version mpp-2.0 ]

3. Installation

3.1. Prerequisite Installation

Note that R, Rserve, vsn and Biobase need to be installed before the arsinh transform option can be used in MPP. Likewise mclust needs to be installed to be able to perform TAM analyses.

3.1.1. Linux/Unix

I will presume that if you are using linux, you have some idea about the linux shell, e.g. bash. If not, then although the commands I describe below are very simple to follow, you will need to know how to log into a terminal, or shell, as root and install software from source.

You will need to retreive the following packages and install them: To install R from source, unpack the R-x.y.z.tar.gz file into a new directory, e.g.
tar -zxvf R-2.4.0.tar.gz
Then for Rserve to work correctly, R needs to be configured with shared library support enabled. You may be able to get a binary package for your distribution with this enabled, but I prefer building from source using commands like so:
./configure --enable-R-shlib
make
make install
This will configure the R source for your system, compile and then install R, hopefully with no hiccups. If the configure step fails, then it is likely that you are missing some development dependencies. R needs a C compiler and a Fortran compiler to compile correctly. I obviously have gcc installed, and also g77 for fortran. Check on the R website for more details on essential dependencies for R.

Some linux distributions have binary packages available from the R website. I have not tested these so cannot vouch for their compatability, but they are usually easier to install than source packages.

To install Rserve, a one-line command will suffice, e.g.
R CMD INSTALL Rserve_0.4-3.tar.gz
This will initialise R and install the Rserve package for you. From the Rserve website:
"If the compilation fails, please check that R shared library exists and is properly installed. It is located in $RHOME/bin and is named libR.so or libR.dylib. If it is missing, get an R distribution with shared library included or compile R with --enable-R-shlib, configure flag."

You can use an identical command to install Biobase, vsn and mclust packages, e.g.
R CMD INSTALL Biobase_1.12.2.tar.gz
R CMD INSTALL vsn_1.12.0.tar.gz
R CMD INSTALL mclust_3.0-0.tar.gz

3.1.2. Windows

You will need to retreive the following packages and install them: Importantly, you will need local administrator rights to install R and optionally change your environment variables. If you do not have these rights, or are not sure, contact your local system or network administrator. Once you have downloaded your R distribution binary file, e.g. R-2.4.0-win32.exe, double-click on the icon or run it from a command line. The install is pretty simple, so just follow the steps.

To run the R executable from any directory, you can add the R install path to your environment variables. Right click on the 'My Computer' icon and select 'Properties'. Under Windows XP, the Environment Variables button is located under the 'Advanced' tab. If an entry is not already there, create a new User Variable with the Variable name 'path' and enter the R 'bin' directory as a Variable value, e.g.
C:\Program Files\R\R-2.4.0\bin
If a User Variable 'path' exists already, simply append a semicolon after any current Variable values and add the R bin path to the end.

Rserve is very easy to install. Simply copy the Rserve.exe to any directory. However, I find it easier to set up R as above, including the environment variables, and put Rserve.exe into the R bin directory. This lets R 'see' the Rserve.exe and also lets you run Rserve from any directory.

Bear in mind that in Windows Rserve needs to be started separately, i.e. there should be a separate startRserve.bat file supplied with MPP that will start Rserve. The mppGUI.bat file will try to start Rserve automatically, but if this somehow fails, run the startRserve.bat file before starting MPP. Rserve needs to be started before MPP to ensure that there is R connectivity!

The Biobase, vsn and mclust R packages can be installed in two ways:
  • Via the R gui (Shortcut on the desktop, or Rgui.exe) - Start the R gui and select the 'Packages' and 'Install packages from local .zip files' menu options. Then select the Biobase and vsn files that you downloaded and R will install them for you.
  • Unpacking the .zip files manually - Not recommended, but you can simply unpack the Biobase and vsn zip files into the 'library' folder in your R installation, e.g. C:\Program Files\R\R-2.4.0\library\

3.2. MPP Binary Installation

If you downloaded the binary (precompiled) version of MPP, installation is very simple. Unzip the mpp-[version].zip (or .tar.gz for *nixes) file to a new directory, such as 'MPP'. The all you have to do is run the batch file supplied for your operating system, i.e. mpp_gui.bat for Windows, mpp_gui.sh for unix variants. This is covered more in Section 4.1.

3.3. Building MPP from source

If you wish to modify MPP, then download the source code (bear in mind the GPL applies). This can then be compiled using Ant, Apache's solution to quick project compilation and document generation, akin to the make program used on Unix variants. MPP comes with a custom build.xml file that Ant uses to manage the build process. This should be sufficient for small changes to the MPP code, and a copy of this file is kept here.

The Apache Ant build tool is used to compile the MPP Java source into bytecode, and then into JAR packages for use and distribution. If you would like to build MPP from source, then simply download the source code package, and type `ant all' when in the same directory as the MPP build.xml file. You can then use the mpp2 or mpp2.bat script files to start MPP.

3.4. Example build.xml


<project name="MPP" default="compile" basedir=".">

 <!-- set global properties for this build -->
 <property name="src" value="./src/org/johninnes/davey"/>
 <property name="build" value="./build"/>
 <property name="dist" value="./dist"/>
 <property name="bindist" value="./bindist"/>
 <property name="srcdist" value="./srcdist"/>
 <property name="johninnes" value="org/johninnes/davey"/>
 <property name="api" value="./docs/api"/>
 <property name="ver" value="2.0"/>
 <property name="libdir" value="./lib"/>
 <property name="extdir" value="./ext"/>
 
 <path id="mpp.classpath">
   <fileset dir="${libdir}">
    <include name="*.jar"/>
   </fileset>
</path>

 <target name="init">
  <!-- Create the time stamp -->
  <tstamp/>
  <mkdir dir="./build"/>
  <mkdir dir="./dist"/>
 </target>

  <target name="all" depends="mpputils, basicstats, parsers, cghdist, core, test">
  <copy todir="${build}">
    <fileset dir="${extdir}"/>
  </copy>
  </target>
  
  <target name="test" depends="">
  <javac srcdir="./src" destdir="${build}" includes="xlParserApp.java">
   <classpath refid="mpp.classpath"/>
  </javac>
 </target>
 
  <target name="core" depends="parsers, basicstats, cghdist">
  <javac srcdir="${src}/mpp/" destdir="${build}" excludes="parsers/ExcelParser.java">
   <classpath refid="mpp.classpath"/>
  </javac>
 </target>
 
  <target name="parsers" depends="mpputils">
<javac srcdir="${src}/parsers/" destdir="${build}">
   <classpath refid="mpp.classpath"/>
  </javac>
 </target> 

  <target name="basicstats" depends="mpputils">
<javac srcdir="${src}/utils/basicstats/" destdir="${build}">
   <classpath refid="mpp.classpath"/>
  </javac>
</target>

  <target name="cghdist" depends="mpputils">
<javac srcdir="${src}/cghdist/" destdir="${build}">
   <classpath refid="mpp.classpath"/>
  </javac>
</target>

  <target name="mpputils" depends="init">
<javac srcdir="${src}/utils/" destdir="${build}">
   <classpath refid="mpp.classpath"/>
  </javac>
</target>

 <target name="compile" depends="parsers">
 </target>

<target name="finaldist">
  <mkdir dir="${dist}"/>
  <!-- Create the distribution directory -->
  <manifest file="./manifest/mainClass.mf">
   <attribute name ="Main-Class" value="org.johninnes.davey.xlParserApp"/>
   <attribute name ="Class-Path" value="
   lib/poi-2.5-final-20040302.jar
   lib/JRclient-RE817.jar
   lib/jcommon-0.9.7-junit.jar
   lib/jcommon-0.9.7.jar
   lib/jfreechart-0.9.21.jar
   lib/vldocking_1.1.jar"/> 
  </manifest>
  <jar jarfile="${dist}/mpp-${ver}.jar" manifest="./manifest/mainClass.mf">
   <fileset dir="${build}">
    <include name="${johninnes}/**.class"/>
    <include name="${johninnes}/**/*.class"/>
    <exclude name="./unused/*"/>
   </fileset>
  </jar>
 </target> 

<target name="parserdist">
  <mkdir dir="${dist}"/>
  <!-- Create the distribution directory -->
  <manifest file="./manifest/xlClass.mf">
   <attribute name ="Main-Class" value="org.johninnes.davey.xlParserApp"/>
   <attribute name ="Class-Path" value="lib/poi-2.5-final-20040302.jar"/>
  </manifest>
  <jar jarfile="${dist}/xlParser-${ver}.jar" manifest="./manifest/xlClass.mf">
   <fileset dir="${build}" includes="
   ${johninnes}/xlParserApp*.class,
   ${johninnes}/mpp/Keyboard.class,
   ${johninnes}/mpp/mppCLI.class,
   ${johninnes}/parsers/ExcelParser.class,
   ${johninnes}/utils/SwingWorker*.class,
   ${johninnes}/utils/IOUtils.class"/>
  </jar>
 </target>
 
 <target name="javadoc">
  <!-- Create the java doc -->
  <mkdir dir="${api}"/>
  <javadoc packagenames="org.johninnes.davey.*" classpath="${dist}/mpp-${ver}.jar" sourcepath="./src" destdir="${api}" author="true" version="true" use="true" private="false" />
 </target> 
 
 <target name="clean">
  <!-- Delete the ${build} directory trees -->
  <delete dir="${build}"/>
 </target>
 
  <target name="distclean">
  <!-- Delete distribution directory trees -->
  <delete dir="${bindist}"/>
  <delete dir="${srcdist}"/>
 </target>
 
 <target name="dists" depends="parserdist, finaldist">
 </target>
 
</project>

3.5. Overview of paths and files

The following paths and files are important to the MPP system, and these should be present in the directory where you unpacked your downloaded archive file:
  • mpp-<version>.jar: The main MPP jar binary file.
  • lib/: This directory holds all libraries required by MPP.
  • mpp_output/: This directory should hold two files upon installation (temp_car_input.data and temp_vsn_input.data) and is the default directory for holding all MPP output files.
  • images/: This directory holds all images used by MPP, i.e. menu icons.
  • help/: This directory holds all MPP documentation, including these help files and the MPP Java API.
  • plugins/transforms/: This directory is where all thrid-party transform plugins should be stored.
  • plugins/analyses/: This directory is where all third-party analysis plugins should be stored.
  • plugins/properties/: This directory is where all properties files for built-in and third-party transforms and analysis plugins should be stored.
  • properties.list: This file must be present in the same directory as the MPP jar binary file. It holds the filenames of the initial mpp and phylogeny properties files. MPP will not start if this file is missing or corrupted!

3.6. Operating System Issues

There should be no issues arising from the use of MPP on different operating systems.
© Rob Davey