NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download
  2. Unpack tar file in home directory
  3. Configure, build, and install
    1. cd R-2.9.0
    2. ./configure --enable-R-shlib --with-readline=no --with-x=no
    3. Fix src/modules/Makefile as follows (fix is from http://tolstoy.newcastle.edu.au/R/e6/devel/09/04/1434.html)
      • Change lines that read:
        Code Block
        for d in "$(R_MODULES)"; do \
           (cd $${d} && $(MAKE) $@) || exit 1; \
        done
        
      • To read:
        Code Block
        @if test "$(R_MODULES)" != ""; then \
          for d in "$(R_MODULES)"; do \
             (cd $${d} && $(MAKE) $@) || exit 1; \
          done; \
        fi
        
        Warning
        titleWarning

        Be very careful of tabs in the lines, one tab to start each line, indent beyond that with spaces. Be careful to have no spaces at the end of the lines too. Use rest of Makefile as an example.

    4. make
    5. make install prefix=/usr/local/R-2.9.0

Dependent R packages (RCurl, SJava, RWebServices, RUnit, DNAcopy)

Installs files into $R_HOME

  1. $R_HOME/bin/R
  2. At the R prompts:
    1. source("http://www.bioconductor.org/biocLite.R")
    2. {{*biocLite()
      ## biocLite("RCurl")
      ## biocLite("SJava")
      ## biocLite("RWebServices")
      ## biocLite("RUnit")
      ## biocLite("DNAcopy")
      ## q()
      # Build SJava links missed by install:
      ## cd $R_HOME/lib64/R/library/SJava/libs
      ## ln -s SJava.so libRInterpreter.so
      ## ln -s SJava.so libSJava.so
      # Build and test SJava/RWebServices installation (as per Bioconductor Installation Guide page 10)Link is https://gforge.nci.nih.gov/docman/view.php/175/20293/Installation_Guide.doc*Image Modified}}
      ## $R_HOME/bin/
    R#
    1. R#* At the R prompts:
    2. #* {}library(RWebServices)#* unpackAntScript("/tmp/rservices")#*
    *
    1. {{q()
    2. cd /tmp/rservices
    3. ant recompile-sjava
    4. ant basic-prop#** Look for any errors)
    5. ant rservices-test#** This step is optional

Install caDNAcopy

This section installs the caDNAcopy grid in three pieces: base code, R web service, and caGrid service. You may skip this section if you are only using caCGHcall.

caDNAcopy Base Code

I'm unclear about whether each of these are steps. If so they should be numbered, if not, perhaps they should stay bulleted.

Chris: Yes, these are all steps.  Anything that I make red is a Unix or R command that the user needs to type at the command line.  You were going to make them all monoface bold italic I think.

Installs into R_HOME

Installs into R_HOME

  1. {{*cd ~ (your home directory)*}}
    # {{*
  2. cd ~ (your home directory)
  3. svn checkout http://gforge.nci.nih.gov/svnroot/bioconductor*}}
    # cd bioconductor/trunk/services/caDNAcopy/R
    # $R_HOME/bin/R CMD INSTALL caDNAcopy

    h3. caDNAcopy RWebService

...



  1. Installs into /usr/local/bioconductor/caDNAcopy
    * cd /usr/local/bioconductor
    * $R_HOME/bin/R
    * At the R prompts:
    ## library(RWebServices)
    ## unpackAntScript("caDNAcopy")
    ## {{*q()
  • Optionally, fix timeout value for all R workers to be 2 hours instead of 60 seconds
    1. Edit $R_HOME/lib64/R/library/RWebServices/scripts/RWebServicesTuning.properties
      • Change to: jms.timeout=7200000
  • cd caDNAcopy
  • ant map-package -Dpkg=caDNAcopy
  • ant unpack-package -Dpkg=caDNAcopy
  • ant precompile
  • Optionally, test RWebService (as per Bioconductor Installation Guide page 11)Link is https://gforge.nci.nih.gov/docman/view.php/175/20293/Installation_Guide.doc:
    1. Start up Tomcat (shutdown if already running)
      • $CATALINA_HOME/bin/startup.sh
    2. Start up ActiveMQ
      • $JMS_HOME/bin/activemq &
    3. Start up R worker for caDNAcopy
      • nohup ant start-worker &
    4. Run the test
      • ant local-test

Check any failures in test/output. Ignore failures that say "expected 79, got 80"

...

  1. Download Bioconductor-caGrid-Services.tar.gz from https://gforge.nci.nih.gov/docman/view.php/175/19977/Bioconductor-caGrid-Services.tar.gz
  2. Unpack tar file in home directory
  3. Build and deploy caDNAcopy grid service
    1. cd caGrid/CaDNAcopy
    • ant deployTomcat
  4. Prepare Tomcat for Grid applications
  5. #* cd $GLOBUS_LOCATION
  1. #* ant -f share/globus_wsrf_common/tomcat/tomcat.xml deployTomcat -Dtomcat.dir="$CATALINA_HOME"#* cp $JMS_HOME/lib/*.jar $CATALINA_HOME/webapps/wsrf/WEB-INF/lib*
  2. Optionally, fix timeout value in caDNAcopy.jar to be 2 hours instead of 60 seconds
    1. mkdir ~/unjar; cd ~/unjar
    2. unzip /usr/local/tomcat-5.5.27-8080/webapps/wsrf/WEB-INF/lib/caDNAcopy.jar
    3. Edit org/bioconductor/rserviceJms/services/caDNAcopy/RWebServices4java.properties
      1. Change to: jms.timeout=7200000
    4. *zip -r caDNAcopy.jar **
    5. {cd /usr/local/tomcat-5.5.27-8080/webapps/wsrf/WEB-INF/lib
    6. cp ~/unjar/caDNAcopy.jar .

Install caCGHcall

This section installs the caCGHcall grid service in three pieces: base code, R web service, and caGrid service. You may skip this section if you are only using caDNAcopy.

caCGHcall Base Code

Installs into R_HOME

  1. {{*cd ~ (your home directory)*}}
    # {{*svn checkout http://gforge.nci.nih.gov/svnroot/bioconductor*}}
    # cd bioconductor/branches/caIntegrator/services/caCGHcall/R
    # $R_HOME/bin/R CMD INSTALL caCGHcall

    h3. caCGHcall RWebService

...


  1. Installs into /usr/local/bioconductor/caCGHcall
    # cd /usr/local/bioconductor

    # $R_HOME/bin/R
    # At the R prompts:
    ## library(RWebServices)
    ## unpackAntScript("caCGHcall")
    ## {{*q()
  2. Optionally, fix timeout value for all R workers to be 2 hours instead of 60 seconds
    1. Edit $R_HOME/lib64/R/library/RWebServices/scripts/RWebServicesTuning.properties
      • Change to: jms.timeout=7200000
  3. cd caCGHcall
  4. Change the queue name for caCGHcall to not conflict with caDNAcopy:
    1. Edit RWebServicesTuning.properties
      • Change to: jms.queue=CGHC
  5. ant map-package -Dpkg=caCGHcall
  6. ant unpack-package -Dpkg=caCGHcall
  7. ant precompile
  8. Optionally, test RWebService (as per Bioconductor Installation Guide page 11):
    1. Start up Tomcat (shutdown if already running)
      • $CATALINA_HOME/bin/startup.sh
    2. Start up ActiveMQ
      • $JMS_HOME/bin/activemq &
    3. Start up R worker for caCGHcall
      • nohup ant start-worker &
    4. Run the test
      • ant local-test

Check any failures in test/output. Ignore failures that say "expected 79, got 80"

...

  1. Build and deploy caCGHcall grid service
    1. cd /usr/local/bioconductor/caCGHcall
    2. ant deployTomcat
  2. Prepare Tomcat for Grid applications
  3. cd $GLOBUS_LOCATION
  4. ant -f share/globus_wsrf_common/tomcat/tomcat.xml deployTomcat -Dtomcat.dir="$CATALINA_HOME"
  5. cp $JMS_HOME/lib/*.jar to $CATALINA_HOME/webapps/wsrf/WEB-INF/lib*

Launch Bioconductor Services

...

  1. Start up Tomcat (shutdown if already running)
    1. $CATALINA_HOME/bin/startup.sh
  2. Start up ActiveMQ
    1. $JMS_HOME/bin/activemq &
  3. Start up R worker for caDNAcopy (skip if only using caDNAcopy)
    1. cd /usr/local/bioconductor/caDNAcopy
    2. nohup ant start-worker &
  4. Start up R worker for caCGHcall (skip if only using caCGHcall)
    1. cd /usr/local/bioconductor/caCGHcall
    2. nohup ant start-worker &

Optional Improvements

Scripts to startup/shutdown Bioconductor

These shell scripts can be used to automate the launch of Bioconductor. If these are used to automatically start the Bioconductor services at system startup, please ensure that all environment variables (as listed in sections above) are already defined. All three scripts should be placed in the same directory and must be set to be executable (chmod a+x). Also note that these scripts are intended to be used with the common logging setup that is described in the section following this one.

  1. start-worker.sh
    Code Block
    
    #!/bin/bash
    #
    
    WORKERTYPE=$1
    WORKERID=$2
    
    # Run worker
    echo "Starting $WORKERTYPE worker ($WORKERID)..."
    cd /usr/local/bioconductor/$WORKERTYPE
    ant start-worker | sed -u "s/\[java\]/\[$WORKERTYPE $WORKERID\]/"
    
  2. start-bio.sh
    Code Block
    
    #!/bin/bash
    #
    LOGFILE=/usr/local/bioconductor/logs/bioconductor-combined.log
    
    THISDIR=`dirname $0`
    
    # Run Tomcat
    echo Starting Tomcat...
    $CATALINA_HOME/bin/startup.sh
    
    # Run ActiveMQ
    echo Starting ActiveMQ...
    $JMS_HOME/bin/activemq start &
    sleep 10
    
    # Run caDNAcopy workers
    nohup $THISDIR/start-worker.sh caDNAcopy 1 >> $LOGFILE &
    nohup $THISDIR/start-worker.sh caDNAcopy 2 >> $LOGFILE &
    
    # Run caCGHcall workers
    nohup $THISDIR/start-worker.sh caCGHcall 1 >> $LOGFILE &
    nohup $THISDIR/start-worker.sh caCGHcall 2 >> $LOGFILE &
    
  3. stop-bio.sh
    Code Block
    
    #!/bin/bash
    #
    
    # Stop ActiveMQ
    $JMS_HOME/bin/activemq stop &
    
    # Stop Tomcat
    $CATALINA_HOME/bin/shutdown.sh
    
    # Stop caDNAcopy/caCGHcall workers
    ### They stop themselves when ActiveMQ shuts down
    

Setting up common logging

One disadvantage to having multiple separate processes for Bioconductor is that each process creates a separate log file by default. By using the following steps, the log files for Tomcat, ActiveMQ, and caDNAcopy/caCGHcall are placed into a single directory (/usr/local/bioconductor/logs). If the scripts in the above section are used, it further improves logging by placing all messages into a single log file (/usr/local/bioconductor/logs/bioconductor-combined.log).

  1. mkdir /usr/local/bioconductor/logs
  2. Edit /usr/local/activemq/conf/log4j.properties
    1. Change "log4j.rootLogger=INFO, stdout" to "log4j.rootLogger=INFO, out"
    2. Change "log4j.appender.out.file=${activemq.home}/data/activemq.log" to "log4j.appender.out.file=/usr/local/bioconductor/logs/activemq.log"
  3. cd /usr/local/bioconductor/logs
  4. ln -s /usr/local/bioconductor/caDNAcopy/nohup.out ./rworker.log
  5. ln -s $CATALINA_HOME/logs/catalina.out ./tomcat.log