QueryBuilder

The ‘QueryBuilder’ allows the users to

  1. construct new queries across multiple data sources in TargetMine
  2. modify the existing template queries to change the output or add a constraint as may be understood from the following example.

The QueryBuilder is very powerful and thus, it is quite complicated. Probably, it is better to start with an example for understanding the QueryBuilder. Templates are built by QueryBuilder and could be good examples.

As an example, let’s start to learn QueryBuilder with the “Gene –> miRNA” template. Click on the ‘Edit Query’ button to go to the QueryBuilder.

A Gene to miRNA template

Click the ‘Edit Query’ button to edit the query in the QueryBuilder

The ‘Model browser’ on the left permits the user to navigate the TargetMine data model. In this example, the model browser displays the initial Gene class and all its attributes (e.g., Name, Symbol) and related classes (e.g., Organism, Proteins). TargetMine uses an object based data model – biological types are termed ‘classes’ and individual entries are termed ‘objects’.

The user can click [+] to open related classes and see their attributes. The [SHOW] tab may be used to add fields to the output. The [CONSTRAIN]  tab allows the user to add constraints (filters).

Upper part of QueryBuilder

The left side is a model browser and the right part shows an overview of the query.

The ‘Query Overview’ section shows the constraints applied to this query. Notice that one of them says ‘Gene’ then ‘LOOKUP 1019‘. This indicates that the query is restricted to a gene with the identifier 1019. You can remove a constraint by click on the [x] button next to the constraint. You can also edit the constraint by clicking on the button. Change 1019 to another gene identifier or the query can be restricted to the genes in a previously defined list.

In this example, we are finding associations between the Gene and MiRNA classes. We start from the Gene class, and reach the miRNA class via the miRNA Interaction class. You can examine it in the ‘Query Overview’.

Underneath the model browser, the ‘Fields selected for output’ displays the fields selected by the user to be displayed in the results. Each field is represented by a box which eventually corresponds to a column in the results table. The order of the fields in the column may be changed by drag and drop.

Lower part of QueryBuilder

You can remove or reorder the columns to be shown in the results table.

Click on ‘Show results’ to see the query results.

Try editing some more templates for learning other examples.