This tutorial explains how to make a new biological data mine using the InterMine.bio system.
There are two parts to InterMine: the data warehouse and the webapp that accesses the data warehouse.
1 Data warehouse
1.1 Get the required software
- See Prerequisites
1.2 Get the InterMine software
- See SVNCheckout
1.3 Create a new mine
- Run the make_mine script by executing this command in the top level of your InterMine checkout:
# in svn/dev ./bio/scripts/make_mine MineName
1.4 Create the databases
- Create PostgreSQL databases for temporary items and for the final production database (as specified in the MINE_NAME.properties file):
createdb common-tgt-items-MINE_NAME createdb production-MINE_NAME
1.5 Configure
- Create MINE_NAME.properties file
- Create a directory called .intermine in your home directory.
- Copy this malariamine.properties file to /.intermine/MINE_NAME.properties.
- Update this properties file with your postgres server location, username and password information for the two databases you just created. The rest of the information is needed for the webapp and we'll update that in Part II of this tutorial.
- Update project.xml file
- Copy bio/tutorial/malariamine/project.xml to your mine:
# in svn/dev cp bio/tutorial/malariamine/project.xml MINE_NAME
- In MINE_NAME/project.xml, replace DATA_DIR with the path to your data directory.
- The project.xml file specifies all of the datasources to be loaded into your mine.
- Copy bio/tutorial/malariamine/project.xml to your mine:
1.6 Set up data to be integrated
- Unzip the sample data to your data directory.
1.7 Build the databases
- The PostgreSQL database to be built is specified in the MINE_NAME.properties file.
- This command will remove any existing data from your production database and needs to be done each time the integration is started.
- This step reads the list of sources from the project.xml file and merges the list of model additions (specified in '*_additions.xml' files) to the core data model. Each source can add classes and fields to the model.
# in MINE_NAME/dbmodel: ant clean ant build-db
1.8 Load data into your database
- Run this command to load the data:
# in MINE_NAME/integrate ant -v -Dsource=all
- See ant for more about loading data using ant
- On a machine with 4Gb RAM (running postgreSQL and Java on the same machine) this takes about 90 minutes to complete.
- Alternatively use the project_build script.
1.9 Run postprocessing (optional)
- Post-processing steps are specified in project.xml and run from the MINE_NAME/postprocess project with:
# in MINE_NAME/postprocess ant
- See PostProcessing for more information.
- NOTE - this is done automatically after integration if using project_build script.
2 Webapp
2.1 Configure
- Update MINE_NAME.properties with details of your local tomcat installation.
2.2 Userprofile database
- This database is used while the webapp is running to store templates, saved queries and login information. The database name is configured in MINE_NAME.properties.
createdb userprofile-MINE_NAME
- Create tables in the userprofile database, load some example template queries and create the superuser login:
# In MINE_NAME/webapp: ant build-db-userprofile
2.3 Release your website
- Compile and build the webapp .war file. This fetches the model from the database, compiles model java code and summarises the contents of the database:
# In MINE_NAME/webapp: ant default remove-webapp release-webapp
- Note that Tomcat should be running already. See Tomcat for more information.
2.4 Use your website
- Test the released webapp by accessing tomcat_server:port/MINE_NAME, e.g. localhost:8080/MINE_NAME
- Tomcat deployed your webapp to the path defined in MINE_NAME.properties.
See also: TroubleshootingTips, GettingStarted
