molgenis
9.0
9.0
  • Introduction
  • What is MOLGENIS
  • Try out MOLGENIS
  • Quick start (docker)
  • Find, view, query
    • Using the navigator
    • Using the search-all
    • Using the dataexplorer
    • Setup authentication
  • Data management
    • EMX format
    • Using expressions in EMX
    • Quickly import data
    • Advanced data import
    • Modify metadata
    • Questionnaires
    • Downloading data
    • MagmaScript expressions (mapping service)
  • Access control
    • Users
    • Groups and roles
    • Finegrained permissions
  • Data processing
    • Scripts
    • R
    • Schedule jobs
  • Configuration
    • Settings
    • Customize MOLGENIS
    • Localization
    • Apps in MOLGENIS
    • Creating themes
    • Migration
    • Auditing
  • Interoperability
    • Swagger specification
    • Data API
    • Metadata API
    • REST api v1
    • REST api v2
    • Files api
    • Import api
    • Permission api
    • Python-api client
    • R-api client
    • Beacon api
    • FAIR api
    • RSQL operators
  • For developers
    • Developing MOLGENIS
    • Developing frontend in MOLGENIS
    • Developing Apps in MOLGENIS
    • Using an IDE (Intellij)
    • Technologies
    • Dynamic decorators
    • Running the integration tests
    • Jobs
    • Security
  • Deploy MOLGENIS
    • Using RPM
    • Technical Migration
Powered by GitBook
On this page
  • Organization
  • Creating your first beacon
  • Creating an organization
  • Specifications
  1. Interoperability

Beacon api

PreviousR-api clientNextFAIR api

Last updated 3 years ago

A beacon is a gateway to your data. By creating a beacon and pointing at specific data sets within the MOLGENIS database, you allow people to query multiple data sets via one entry point.

Read more about beacons .

The MOLGENIS Beacons are meant to be used with genetic data sets containing at least the following column types:

  • Chromosome

  • Start position

  • Reference allele(s)

  • Alternative allele(s)

A MOLGENIS beacon only exposes whether a specific variant exists. Nothing more.

Organization

An organization can be used to organize one or more beacons. An organization is the business card for your beacons. When hooking up your beacon to the global , the organization information is shown when your beacons respond to queries.

Creating your first beacon

When you have uploaded some genetic data sets in the form of an EMX or VCF, you can go to the Dataexplorer to start creating your first beacon.

The following examples work with .

Select the Beacon table in the dropdown, and add a new row.

The beacon created here has only one data set, namely beacon_set. Note that the Organization is still empty, we will come back to that later.

Now that we have created a beacon, we can actually already query for variants.

Seeing a list of all the beacons http://localhost:8080/beacon/list

produces

[
 {
   "id": "MyFirstBeacon",
   "name": "My First Beacon",
   "apiVersion": "v0.3.0",
   "datasets": [
     {
       "id": "beacondataset",
       "name": "My First Beacon dataset"
     }
   ]
 }
]

See the info of one beacon http://localhost:8080/beacon/MyFirstBeacon

produces

{
   "id": "MyFirstBeacon",
   "name": "My First Beacon",
   "apiVersion": "v0.3.0",
   "datasets": [
     {
       "id": "beacondataset",
       "name": "My First Beacon dataset"
     }
   ]
}

Query the beacon for a variant via GET or POST http://localhost:8080/beacon/MyFirstBeacon/query?referenceName=7&start=130148888&referenceBases=A&alternateBases=C

http://localhost:8080/beacon/MyFirstBeacon/query

{
  "referenceName": "7",
  "start": 130148888,
  "referenceBases": "A",
  "alternateBases": "C"
}

produces

{
  "beaconId": "MyFirstBeacon",
  "exists": true,
  "alleleRequest": {
    "referenceName": "7",
    "start": 130148888,
    "referenceBases": "A",
    "alternateBases": "C"
  }
}

When querying goes wrong When an exception occurs, we return a response containing a BeaconError

{
  "beaconId": "MyFirstBeacon",
  "error": {
    "errorCode": 400,
    "message": "Unknown beacon [MyFirstBeacon]"
  },
  "alleleRequest": {
    "referenceName": "7",
    "start": 130148888,
    "referenceBases": "C",
    "alternateBases": "A"
  }
}

Creating an organization

For your beacon to look nice to the world, we will add it to an organization.

In the dataexplorer, go to the dropdown in the top right, select the BeaconOrganization table, and add a new row

Configure dataset as Beacon

And now we can link to this organization and dataset by editing the Beacon row we created before

And by requesting info on our beacon again http://localhost:8080/beacon/MyFirstBeacon

We now get information on our organization

{
  "id": "MyFirstBeacon",
  "name": "My First Beacon",
  "apiVersion": "v0.3.0",
  "organization": {
    "id": "beaconorg",
    "name": "Beacon organization",
    "description": "Beacon organizational unit"
  },
  "datasets": [
    {
      "id": "beacondataset",
      "name": "My First Beacon dataset"
    }
  ]
}

Specifications

Within MOLGENIS we decided on a subset of the API. Due to the dynamic nature of our data, we can not always supply all fields.

The complete specification can be found on

ga4gh-beacon/specification
here
https://beacon-network.org
this data
Creating a Beacon
Creating a Beacon Organization
Configure dataset as a beacon
Adding a Beacon