Widgets

There are several widgets available on the InterMine list analysis page, and they are configured in webconfig-model.xml.

There are three categories of widget:

table widgets

What is it:

This widget displays the counts from the list for the collection specified.

What you have to do:

All you need to do is add the entry to webconfig-model.xml.

What to add to webconfig-model.xml:

<bagtabledisplayer 
     title="Department information" 
     type="Department" 
     collectionName="department"
     description="Most popular Departments for this list" />

What will appear on the list analysis's Widget section:

Screenshot of a sample table widget

graph widgets

What is it:

This widget takes a dataset you specify and renders it in a chart.

What you have to do:

You have to create three Java files:

  • DataSetLoader
    • Retrieves the data to be rendered in the chart.
  • URLGenerator
    • The bars on the chart are clickable.
    • This class will generate the URLs assigned to each bar on the chart.
  • ToolTipGenerator
    • A tooltip pops up when the user hovers over the bars on the graph.
    • This class will generate the tooltips.
    • For instance, if a specific bar on the chart represents three departments, when the user hovers over that bar, a tooltip will popup displaying the three departments: "Accounting, Human Resources, IT".
    • This gives the user a quick way to see the results of the graph without having to click through.

NOTE: The graphs use a Java library called JFreeChart. Currently only BarCharts and StackedBarCharts are supported.

What to add to webconfig-model.xml:

<graphdisplayer title="Chromosome Distribution" 
     domainLabel="Chromosome" 
     rangeLabel="Gene Count" 
     dataSetLoader="org.intermine.bio.web.widget.ChromosomeDistributionDataSetLdr"
     toolTipGen="org.intermine.bio.web.widget.ChromosomeDistributionToolTipGenerator" 
     urlGen="org.intermine.bio.web.widget.ChromosomeDistributionGraphURLGenerator"
     description="Actual: number of genes in this list found on each chromosome.  Expected: given the total number of genes on the chromosome and the number of genes in this list, the number of genes expected to be found on each chromosome." 
     graphType="BarChart"/>

What will appear on the list analysis's Widget section:

Screenshot of a sample graph widget

What to add to webconfig-model.xml:

<graphdisplayer title="Gene Expression in the Adult Fly (FlyAtlas)" 
     domainLabel="Tissue" 
     rangeLabel="Up (+) or Down (-) gene count" 
     dataSetLoader="org.flymine.web.widget.FlyAtlasDataSetLdr"
     toolTipGen="org.flymine.web.widget.FlyAtlasToolTipGenerator" 
     urlGen="org.flymine.web.widget.FlyAtlasGraphURLGenerator"
     description="For each tissue in the adult fly, the number of genes from this list for which the levels of expression are significantly high (Up) or low (Down) according to &lt;a href=&quot;http://www.flyatlas.org/&quot; target=&quot;_new&quot;&gt;FlyAtlas&lt;/a&gt; AffyCall."  
     graphType="StackedBarChart" />

What will appear on the list analysis's Widget section:

Screenshot of a sample graph widget (stacked bar chart)

enrichment widgets

What is it:

This widget displays the p-values of objects that appear in your list.

What you have to do:

You need to provide two Java classes:

  • DataLoader
    • This class generates the queries needed for the statistical analysis.
  • URLQuery
    • This class generates the queries used to generate results when a user clicks on a specific data point.

What to add to webconfig-model.xml:

<enrichmentwidgetdisplayer title="Publication Enrichment" 
     link="org.intermine.bio.web.widget.PublicationURLQuery" 
     controller="org.intermine.bio.web.widget.PublicationLdr" 
     description="Publications enriched for genes in this list.  " />

What will appear on the list analysis's Widget section:

Screenshot of a sample enrichment widget

FAQs

I have no idea what's going on. Where do I start?

It's probably easiest to take an existing widget from FlyMine and edit it.

I followed your directions, but my widget isn't showing up.

  1. The list is of a different type.
    • When you added the widget to the webconfig-model.xml file, you placed it under a specific class from your model. The widget will only display on list analysis pages of that type. For instance, if you placed it under the Employee class, the widget will only display for lists containing objects of type Employee.
  2. There is a typo somewhere or you didn't follow directions.
    • Something has gone wrong somehow. Check your log files.

Attachments