The ‘QueryBuilder’ allows the users to
- construct new queries across multiple data sources in TargetMine
- 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.
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 tab may be used to add fields to the output. The tab allows the user to add constraints (filters).
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 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.
Click on ‘Show results’ to see the query results.
Try editing some more templates for learning other examples.