Benaroya Research Institute Gene Expression Browser (GXB) for integrating Microarray, RNA-seq data, expression data with demographic and clinical information.
Start with a clean Ubuntu Installation (or VM)
Verify Java 7 installation (apt-get install openjdk-7-jre-headless; java -version)
Verify Apache2 installation (apt-get install apache2)
Enable apache/tomcat tunneling (apt-get install libapache2-mod-jk)
Install Tomcat (apt-get install tomcat6)
Install R (see http://cran.r-project.org/bin/linux/ubuntu/README; apt-get install r-base)
Grant permissions to write to R library (chmod -R a+rwx /usr/lib/R)
Update Tomcat startup params (/etc/default/tomcat6)
Setup mod-jk to allow /dm3 to pass through from apache (/etc/apache2/mods-available/jk.conf)
jkMount /dm3/ GXB
jkMount /dm3/* GXB
jkMount /dm3* GXB
Install mongo (http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux/)
Create mongo user, password and datbase for application
Install MySQL (apt-get install mysql-server)
Create mysql user, password, and database (recommend 'dm3') for application, grant db permissions for that user to dm3
Load starter databases (see http://gxb.benaroyaresearch.org/downloads/dm3_core.sql)
Install Grails 2.1.0 (https://grails.org/download.html)
Create MAT,ranklist, and scripts directories under apache htdocs:
mkdir {Apache HTDocs} (often /var/www)
mkdir {Apache HTDocs}/MAT
mkdir {Apache HTDocs}/ranklist
mkdir {Apache HTDocs}/scripts/ModuleAnalysis
Copy R scripts from repository into scripts/ModuleAnalysis directory.
Create file storage directory:
mkdir /var/local/dm
The approximate steps for building the application are:
mkdir build-tmp
cd build-tmp
export JAVA_HOME={your Java 7 home}
git {clone|fetch|fork} {repository} dm
cd dm
git rev-list HEAD --count | sed 's/$/-stable-gxb1-release/' >> grails-app/views/builddate.gsp
export GRAILS_HOME={/opt/local/}grails-2.1.0
export PATH=$GRAILS_HOME/bin:$PATH
grails war
Copy target/dm3-1.70.war as dm3.war to the webapps directory of tomcat.
The following should be placed in either setenv.sh for tomcat (catalina.sh), or read in by setenv.sh from some other file. The goal is to have them in the runtime environment of the tomcat process.
export DM3_IMPORTER_SERVER={hostname}
export DM3_LOG_DIR=/usr/local/tomcat/logs
export DM3_SERVER_URL="http://{hostname}/dm3"
export DM3_EXPRESSION_SERVICE=http://localhost:8080/dm3/sampleSet/makeArrayDataDetailTSVFile
export DM3_MAT_R_EXECUTABLE=/usr/bin/Rscript
export DM3_FILE_BASEDIR=/var/local/dm/
export DM3_MAT_WORK_DIR=/var/www/MAT
export DM3MYSQLDB={MySQL database name}
export DM3MONGODB={Mongo database name}
Create a file named dm3-config.groovy containing the usernames and passwords for database access. Example:
println "credentials loaded from classpath"
dataSource.username={MySQL username}
dataSource.password={MySQL password}
mongodb.username={Mongo username}
mongodb.password={Mongo password}
Place this file on the classpath for tomcat and the web applications, we use {Tomcat6 HOME}/lib.
Finally, start apache, then start tomcat. Give tomcat some time to start, then use your favorite browser to go to http://{hostname}/dm3. If no joy, peruse catalina.log in the Tomcat log directory for clues to the startup issues.