RMA Query Builder

The RMA builder is a small demonstration web application that builds query links to access the Allen Brain Atlases API. It uses the schema to reduce the need to look up what relations are available.

To perform a simple query, select a data format, such as XML or JSON. Then click the 'Model' button. A form will appear with several option. Select 'Chromosome' from the 'Model:' box. Click the 'Build Query' button on the right side. A query URL will appear below the button. It is broken into several lines to be a little easier to read. A click-able 'Link' will also appear that can be used to execute the query. The resulting data will appear in a new browser window or tab. This particular query simply displays chromosome records.

To build a more interesting query, the buttons with punctuation marks can be used to add filters, include associations, sort results, page through the results and many other operations. The punctuation marks generally correspond to the operators described in the RMA Syntax section of the Allen Brain Atlas API documentation.

You might want to display information about the organism associated with each chromosome. With the Chromosome model selected as before, simply select 'organism' in the box marked "Include" in the 'Display' section of the tool. Click 'Build Query' and follow the 'Link' to see the organism information nested in the chromosome results.

The RMA Query Builder can also be used to access services as well as data through the Allen Brain Atlas API. A simple example is a text search. Begin by reloading the RMA builder page or clicking the red 'X' next to 'Model Stage' to clear the workspace. Then click the 'Service' button to open a service stage template. Select 'Text Search' from the 'Services' box. Type 'cation' without quotes in the box labelled 'Query String'. Select 'Gene' in the 'Search Model' box. Click 'Build Query' on the right and follow the link to see genes that are associated with the word 'cation'. Often this is a name or an acronym, but it might also be a text field in an associated object. The service parameters are documented in the Connected Services and Pipes section of the API documentation and there are service query examples in links throughout the documentation.

One place to start is to work through the examples in the RMA syntax documentation and to try to build them in the RMA builder.

Documentation and Resources

RMA Builder RMA Query Builder Utility
RMA Syntax RMA Query Language Documentation
rma_builder.tar.gz Archived source code.