Skip to content

API usage examples

Tomasz Szymczyszyn edited this page Feb 28, 2017 · 3 revisions

Brassica Information Portal exposes an API which allows to access individual database records (see documentation) and as such provides low-level building blocks for creating API clients for complex real-world scenarios. Below we provide a few examples of such clients built for common use cases. It should be noted that these scripts are not meant to be generic, all-purpose clients for the BIP API. Rather, their purpose is to demonstrate how to prepare your own scripts, matching specific user requirements.

Fetching trait scoring

In order to fetch trial scoring data the following script can be used.

$ ruby trial_analysis_YorkAT.rb trial-name api-key > output.tsv

Trait scoring submission

Another script allows to submit trial scoring without the need to use interactive forms. Submission data needs to be prepared as a CSV file (see example).

$ ruby bip_client_example.rb csv-input-file api-key
Clone this wiki locally