Skip to content


Repository files navigation

InterMine Webservice Client Examples

This Java client library is for use with Web services attached to InterMine data-warehouses. It abstracts and simplifies techniques for making structured queries on remote databases using the InterMine REST interface.


Autogenerated Code

The easiest way to use the client is to run a query in a mine, and autogenerate the code you need to run that query in the client. You can get example Java web service API code either from a Template Query or the QueryBuilder:

  • From the QueryBuilder - after creating or editing a query, click the "Java" link in the Actions section below the query details.
  • From a Template Query form - click the "Java" link below the template form.


We provide the following sample programs to demonstrate ways to use the services:

Query client

The QueryClient demonstrates the use of the InterMine Query Web Service. This resource can be used to perform arbitrary, complex queries over the full set of data in the InterMine data warehouse.

This example displays the first 100 Drosophila melanogaster genes sorted by the FlyBase identifier.

 ./gradlew execute -PmainClass=samples.QueryClient

Template client

The TemplateClient demonstrates the use of the InterMine Template Web Service. This resource can be used to automate access to the predefined queries which an InterMine data warehouse has made available.

This example returns the first 100 predicted orthologues between two organisms sorted by FlyBase gene identifier.

 ./gradlew execute -PmainClass=samples.TemplateClient

List client

The ListClient demonstrates the use of the InterMine List Web Service.

This example fetches all public lists containing the FBgn0000606 gene.

 ./gradlew execute -PmainClass=samples.ListClient

Overlaps example

This example demonstrates how you can query for overlapping features for the given coordinates.

./gradlew execute -PmainClass=samples.OverlapsExample --args="2L:14615455..14619002 2R:5866646..5868384 3R:2578486..2580016"

GenesFinder client

The GenesFinder demonstrates the use of command line arguments, with a query client fetching Genes or SequenceFeatures located at specific positions with some tolerance. You can use the included sample-input.txt to try this client:

 ./gradlew execute -PmainClass=samples.GenesFinder --args="--sample-data"


Examples for using the InterMine Java client







No releases published


No packages published