This tutorial aims to cover the basics of configuring an InterMine webapp.
In general, customisation of InterMine is accomplished by updating the appropriate configuration file and redeploying the webapp. A few features are updated via tagging as well. See Guide to Customising your Web Application for the full documentation on the webapp.
Note
You should have completed the previous tutorial and have successfully deployed the webapp.
This tutorial is intended to give a general idea of what you can customise in InterMine and how to do it. We’re going to go through each section of the webapp and give step by step instructions on how to configure different parts of the page. This is a detailed tutorial and should take you a few hours to complete – however it is not meant to be comprehensive. Where topics aren’t covered, there are links provided for more information. If you have a question that you don’t see answered, try searching the documentation or taking a look at the index. Intermine has an active developer’s Mailing list as well.
Tomcat
You will need to have Tomcat running for this tutorial.
If your webapp is under heavy usage or development, Tomcat may run out of memory. See Tomcat for details on how to update your settings to adjust the amount of memory available to Tomcat.
If Tomcat has run out of memory, it may not shut down correctly. Memory handling seems to have greatly improved with Tomcat 7 however.
Each web page in InterMine has the same header and footer. The header contains everything at the top of the page, including the navigation tabs and the keyword search. The footer contains the contact form and InterMine logo.
Let’s start configuring our mine by updating these common sections of our web application.
First, let’s update the logo of your site. The logo should be 45x43 and named logo.png, for example:
$ ant default remove-webapp release-webapp
You should see your new logo in the top left corner of your webapp. If you don’t, try clearing your browser’s cache.
If your changes are still not being reflected in your webapp, add the clean target:
$ ant clean; ant default remove-webapp release-webapp
This removes all temporary directories so you are certain your new files are being used. The clean-all target removes temporary directories from all dependencies as well.
See Ant for a list of all ant targets.
Next to the name of your mine in the header is the release version and subtitle for your mine:
These values are set in Database and Web application file. This is the same properties file you updated in the previous tutorial. The subtitle and release versions are populated by the properties project.subTitle and project.releaseVersion, respectively. Update these properties to a different value and redeploy your webapp using the commands given above. Once you have successfully released your webapp, you should see your new subtitle.
$ emacs ~/.intermine/malariamine.properties
# text that appears in the header and elsewhere
project.title=MalariaMine
project.subTitle=An example of InterMine.bio with data from <i>Plasmodium falciparum</i>
project.releaseVersion=tutorialx
$ ant default remove-webapp release-webapp
That’s it! Well done! The majority of mine configuration will be accomplished this way - update a property in a text file and redeploy the webapp.
See Database and Web application for the full list of properties this file controls.
Now you know how to change properties and configure your mine. How then do you know which property to change? There are a few resources available to you:
Show all properties
You can also see and edit the values of every property set for your mine.
This lists of all properties that are used in your webapp. You can update the values for each property and instantly see how the webapp is changed, without worrying about breaking anything. (The changes only last for that session, to permanently change a value you’ll need to update the appropriate config file.)
InterMine’s keyword search uses a Lucene-based index created at build-time. Every field in the database is indexed unless you configure a table or column to be skipped. You can also configure facets / categories to help your users mine the search results. See Keyword Search for details on how to configure the keyword search.
The first search
When the first search is executed after a webapp is released, the search index is:
This can take up to a minute. Our release scripts include a command to run this search so that the index is preloaded.
The search box contains example identifiers to help your users know which types of search terms to use. To update the default value, set the quicksearch.example.identifiers property in the web.properties file. Redeploy your webapp to see your changes.
Note
The Lucene index can become quite large, depending on the size of the database. FlyMine’s index is ~2G, so make certain you have plenty of room.
Most everything on the home page is customisable. You can edit the text and set which RSS news feed to use. If you want something very different, you can create and use your own home page.
You can customise the text in the three boxes that appear on the top of the home page. Let’s edit the example given in the middle box marked Analyse.
Notice the text box already has an example, e.g. X, Y, Z. This is the default example and it’s set by begin.listBox.example in an InterMine properties file, global.web.properties.
Add begin.listBox.example to your mine’s Features file and redeploy your webapp to see your changes.
In Intermine there are 3 webapp projects: InterMine, bio and mine. You shouldn’t ever have to change the files in InterMine and bio, you’ll only ever update your mine’s files. When the webapp is compiled, the build system starts with the InterMine webapp project, then merges bio into that. Finally your mine’s webapp is added. The files and properties set in bio override any in the InterMine project. Your mine’s files and properties override any in bio or InterMine.
Therefore when you set begin.listBox.example in your properties file, it overrode the same property set in the InterMine properties file. This will be true of any property.
The text and settings are configurable, but you may want a different layout for your home page.
We saw in the previous section that properties override InterMine properties. The same holds true for JSP pages.
Note: Changes made to the home page, or whichever page you updated, will not be reflected in your custom copy.
See Home page for more details on how to update your home page.