GettingStarted > WebApp
This page is meant as an introduction to some topics relating to the InterMine webapp.
1 Using the Webapp
Take a tour of FlyMine to become familiar with the webapp. Pay particular attention to the QueryBuilder section as we will be using the QueryBuilder to build template queries in Step 3.
Then complete the exercises here InterMineWebappWorkshopFall2008.pdf.
2 Launch your webapp
If you haven't already, you should complete all steps on the previous page, GettingStarted.
3 Login as the SuperUser
- The SuperUser is the admin for the InterMine webapp. The SuperUser can use tags to update the look of the InterMine webapp.
- The SuperUser account was created when the UserProfile database was built (on Step 13.2 on GettingStarted). The username is the name specified in your MINE_NAME.properties file:
# in MINE_NAME.properties superuser.account=testuser@domainname.org superuser.initialPassword=somepassword
- If you do not provide a password, then one will be randomly generated. To retrieve that password, you can use the 'Forgot password' link on your webapp to receive a link to reset the password. Passwords are now stored in the database in hashed format, so it is not possible to work out the password by looking in the database.
- Login using the login link on the upper right hand corner of the webpage on your InterMine webapp.
- At the very bottom of the page there should be the text "admin mode". If you don't see this text, you haven't successfully logged in as the SuperUser.
4 Template queries
Templates are predefined queries built using the QueryBuilder. Begin by importing some templates from FlyMine.
4.1 Sharing template queries
You can shared template queries between InterMines.
- Navigate to FlyMine's template query page.
- Check the box next to each template you want and click on the 'export selected' button at the top. That will produce a page of XML representing those template queries.
<template-queries> <template name="Gene_Protein" title="Gene --> Proteins." longDescription="Show the proteins for a particular gene." comment="06.06.07 updated to work from gene class - Philip"> <query name="Gene_Protein" model="genomic" view="Gene.primaryIdentifier Gene.symbol Gene.proteins.primaryIdentifier Gene.proteins.primaryAccession" longDescription="Show the proteins for a particular gene." sortOrder="Gene.primaryIdentifier asc"> <pathDescription pathString="Gene.proteins" description="Protein"> </pathDescription> <node path="Gene" type="Gene"> <constraint op="LOOKUP" value="CG1046" description="" identifier="" editable="true" code="A"> </constraint> </node> <node path="Gene.proteins" type="Protein"> </node> </query> </template> </template-queries> - Login as the superuser to your mine and go to the saved templates page in mymine.
- Click on the 'import templates' link at the top of the page, and then copy and paste the XML into the text box. Submit the form to import these templates into your webapp.
- You will be forwarded to the templates page in MyMine. Any invalid templates will be crossed out and in red. Any user who is logged in can create a template, but the SuperUser can tag templates to make them appear on list and report pages. See the next section for more information on tagging.
4.2 Building a template query
- Edit a template
- Navigate to MyMine > Saved Templates in your InterMine webapp.
- Click on a 'Edit template' link and use the QueryBuilder to change the template.
- Add a constraint or a column to the results and run the template. Compare the results to the original template.
- Create your own template
4.3 Autocomplete
You can make a template form easier to use by making a form field 'autocomplete'. This means that the form will suggest answers as the user is typing.
Make GOTerm.name autocomplete in a template query form. See ObjectStoreSummaryProperties for details how to do this.
5 Tags
The Superuser can use tags to alter the layout of the webapp.
The tag im:public allows all users to see a list or template. The tag im:frontpage allows a public list/template to appear on the home page of the webapp. See Tagging for the complete list of available tags.
5.1 Templates
- Publish a template query.
- Navigate to the Templates page in the MyMine section of the webapp.
- Click on the “MyMine” tab in the top menu bar
- Click on the “Saved Templates” link in the submenu bar (the green bar directly below the tabs)
- This page lists all of the templates you have saved.
- Add the im:public tag to a template.
- The second column is the name of the template. Underneath the template are all of the tags for each template.
- Click on the “Add tags” link under the name of a template.
- Click on the “New tag” link.
- Type in the tag name, im:public.
- Click the “Add” button.
- Verify that your template appears to all users.
- Click the “Log out” button in the top right corner of the webpage
- Click on the “Templates” tab in the top menu bar.
- Navigate to the Templates page in the MyMine section of the webapp.
5.2 Lists
You can also create and share lists. Repeat the steps listed in the previous section to display your list on the lists page.
5.3 Report page
Using tags, you can change where data is displayed on the report page.
- Add the Protein.features collection to the "Summary" section of the Protein report page .
- Navigate to a protein report page, eg P62368.
- Tag the features collection with the “im:summary” tag.
- Click on the “expand all” link next to the “Further Information by Category“ title on the gray bar.
- Click on the “Add tags” link to the right of the features collection.
- Select “im:summary” from the dropdown. If im:summary is not listed in the dropdown, click on the New tag link and enter im:summary in the form field.
- Click the “Add” button.
- Refresh the page to view your changes.
- See Tagging for detailed information about tags and taggable objects.
6 Linkouts
You can update the web.properties file to add links from the report and lists pages to other websites.
6.1 Link to external website
- Link to UniProt from a protein report page.
- Add properties to web.properties
attributelink.uniProt.Protein.*.primaryIdentifier.url=http://www.uniprot.org/entry/<<attributeValue>> attributelink.uniProt.Protein.*.primaryIdentifier.text=uniprot:<<attributeValue>> attributelink.uniProt.Protein.*.primaryIdentifier.imageName=uniprot_logo_link.jpeg
- Re-release your webapp
- Verify your changes by viewing the link on a protein report page
- Add properties to web.properties
- Post a list of identifiers to an external website.
- Add properties to web.properties
attributelink.flybase.Allele.*.primaryIdentifier.list.url=http://www.flybase.org/cgi-bin/export2batch.pl?convert=HitList&items=<<attributeValue>> attributelink.flybase.Allele.*.primaryIdentifier.list.text=FlyBase attributelink.flybase.Allele.*.primaryIdentifier.list.imageName=flybase_logo_link.png attributelink.flybase.Allele.*.primaryIdentifier.list.usePost=true
- Re-release your webapp
- Verify your changes by viewing the link on a Allele list analysis page
- Add properties to web.properties
6.2 Link to another InterMine
Below is an example of how to link to a FlyMine list analysis page with a list of yeast identifiers. The attribute &orthologue= will cause the yeast genes to be converted to the orthologonous dmel genes.
attributelink.flyList.Gene.4932.primaryIdentifier.list.url=http://www.flymine.org/query/portal.do?externalids=<<attributeValue>>&class=Gene&orthologue=D. melanogaster attributelink.flyList.Gene.4932.primaryIdentifier.list.text=D.mel orthologues in FlyMine attributelink.flyList.Gene.4932.primaryIdentifier.list.imageName=flymine_logo_link.gif attributelink.flyList.Gene.4932.primaryIdentifier.list.usePost=true
- See: WebappConfig for more information.
7 Widgets
Widgets are displayers on the report page that show summary data. There are currently three types of widgets: table, graph, and enrichment widgets.
- See Widgets overview of current widgets and a detailed look at how they are configured.
- Configuration for the interactions table widget in FlyMine:
<bagtabledisplayer id="interactions" title="Interactions" typeClass="org.intermine.model.bio.Gene" pathStrings="Gene.interactions.interactingGenes" columnTitle="Interactions" description="Genes (from the list or not) that interact with genes in this list. Counts may include the same interaction more than once if observed in multiple experiments." link="org.intermine.bio.web.widget.InteractionURLQuery" displayFields="primaryIdentifier" exportField="primaryIdentifier" />
8 Displayers
See: ReportDisplayers
9 WebServices
InterMines have webservices available where users can access the data in InterMine via a URL.
Exercises
Back: GettingStarted
