Query Builder

From WormBaseWiki
Jump to navigationJump to search

WormMine QueryBuilder

You can setup your own queries by using the QueryBuilder. The builder is a powerful tool that allows the user to create queries that can span different classes in WormMine and overall different sources of information.

The easiest way to get acquainted with the QueryBuilder is to edit and modify a template (just click on the Edit Query button Querybuilder 1.png). The builder can be also accessed by clicking on the Select a Data Type to Begin a Query box from the QueryBuilder page, or by clicking the name of the class in the Data Model. By clicking on the class name, it will bring up the builder interface shown below.

Querybuilder 2.png

There are two options to add items from the Model Browser side of the screen to the query:

  • Clicking on Show will transfer the item to the query and the result will have the item's information, meaning all elements with that item will be shown in the final table

Querybuilder 3.png

  • Clicking on Constrain will also transfer the item to the query, but will ask for input regarding the constraint to be applied. If, for instance, Gene Name is selected, the dialog will ask for a match (=) or not (!=), or some other filter (Boolean and wildcards accepted). Alternatively to specifying a particular constraint, a user can indicate whether the attribute should either HAVE or NOT HAVE a value. Take a look at the image below.

Querybuilder 4.png

Adding the constraint to the query will have it displayed on the right side of the screen. We can add more constraints that will filter the results further. We can also add more items by clicking on Show for each attribute, and this will append additional columns to the result table.

Querybuilder 5.png

The columns to be displayed are shown at the bottom of the builder. Column order can be easily modified by dragging and dropping the boxes in the desired order. To run the query, simply click on Show Results Querybuilder 7.png.

Querybuilder 6.png