BeaconPlus::QueryParameters.pm Perl Code Documentation

The BeaconPlus environment utilizes the Beacon protocol for federated genomic variant queries, extended by methods discussed in the Beacon API development and custom extensions which may - or may not - make it into the Beacon specification but help to increase the usability of the Progenetix resource.

Reading the Beacon Specification

While the specification in principle follows the Beacon specification, and offers a minimal method to access it, this optioned isn’t used in practice due to the “forward looking” nature of some of the BeaconPlus methods.

Deparsing the query string

The query string is deparsed into a hash reference, in the “$query” object, with the conventions of:

The treatment of each attribute as pointing to an array leads to a consistent, though sometimes awkward, access to the values; even consistently unary values have to be addressed as (first) array element.

Matching parameters to their scopes

In the configuration file, the root attribute scopes contains the definitions of the different “scopes” (essentially the different data collections) and which query parameters can be applied to them. These definitions also define

Foreach of the scopes, the pre-defined possible parameters are evaluated for corresponding values in the object generated from parsing the query string. If matching values are found those are added to the pre-formatted query parameter object for the corresponding scope. Those scoped parameter objects will then be processed depending on the type of query (e.g. “variants” queries have a different processing compared to “biosamples” queries; see below).

Sample (biosamples and callsets) Queries

Queries with multiple options for the same attribute are treated as logical “OR”.

The construction of the query object depends on the detected parameters:

Links

2019-08-19