SlideShare a Scribd company logo
1 of 31
Download to read offline
This project has received funding from the European Union’s Horizon 2020 research and
Innovation programme under grant agreement No. 825775
This project has received funding from the Canadian Institute of Health Research under
grant agreement #404896
Lighting a Beacon:
Training for (future) implementers
Who is this talk for?
Beacon implementors
and software developers
Beacon users
Contents
• Beacon Framework

• Beacon Model

• How to start implementing a beacon from scratch
PART 1
PART 2
What is Beacon?
HTTP
API
DB
Request
(GET or POST + JSON)
Response
(JSON)
Framework
Model
Beacon Framework
Framework
Model
• Specifies the structure of the wrapper
of the results.

• Allows the interoperability of beacons
with different data, since they all
understand the same protocol.
Beacon Framework: Types of beacon
Framework
Model
Boolean Beacon
Count Beacon
ResultSets Beacon
Beacon Model
Framework
Model
• Describes the entities that the beacon
supports.

• Describes the schemas of those
entities.
Beacon Model: Entities
Analyses Biosamples Cohorts
Datasets Genomic Variations Individuals
Runs
Framework
Model
https://beacon-schema-2.readthedocs.io
Beacon Model viewer:
Example request & response
Request Response
{

"meta": {

"beaconId":"org.example.beacon.v2",

"apiVersion": "v2.0",

"returnedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ],

"receivedRequestSummary": {

"apiVersion": "v2.0",

"filters": …,

"requestParameters": …,

"includeResultsetResponses": "HIT",

"requestedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ],

"pagination": { "skip": 0, “limit":10 },

“requestedGranularity”: “count”

}

},

"responseSummary":{

"exists": true,

"numTotalResults": 25355

},

"info": {

"someInterestingStuff": "this is the interesting stuff"

},

“beaconHandovers":[ 

{

"handoverType": { "id":"EFO:0004157", "label":"BAM format" },

"url":"https://api.mygenomeservice.org/Handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0",

"note":"This handover link provides access to a summarized VCF."

}

]

{

"meta": {

"apiVersion": "v2.0",

"requestedSchemas": [{

"entityType": "EntryTypeA", 

"schema": “entry-typeA-schema-v2.0”

}]

},

"query": {

"requestParameters": {

"datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] }

},

"filters": [ 

{

"id": "EFO:0001212",

"scope": "biosamples"

}

],

"includeResultsetResponses": "HIT",

"pagination": { "skip": 0, "limit": 10 },

"requestedGranularity": “count"

}

}
Example request
Request
{

"meta": {

"apiVersion": "v2.0",

"requestedSchemas": [{

"entityType": "EntryTypeA", 

"schema": “entry-typeA-schema-v2.0”

}]

},

"query": {

"requestParameters": {

"datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] }

},

"filters": [ 

{

"id": "EFO:0001212",

"scope": "biosamples"

}

],

"includeResultsetResponses": "HIT",

"pagination": { "skip": 0, "limit": 10 },

"requestedGranularity": "count"

}

}
Example request & response
Request Response
{

"meta": {

"beaconId":"org.example.beacon.v2",

"apiVersion": "v2.0",

"returnedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ],

"returnedGranularity": "count",

"receivedRequestSummary": {

"apiVersion": "v2.0",

"filters": …,

"requestParameters": …,

"includeResultsetResponses": "HIT",

"requestedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ],

"pagination": { "skip": 0, “limit":10 },

“requestedGranularity”: “count”

}

},

"responseSummary":{

"exists": true,

"numTotalResults": 25355

},

"info": {

"someInterestingStuff": "this is the interesting stuff"

},

“beaconHandovers":[ 

{

"handoverType": { "id":"EFO:0004157", "label":"BAM format" },

"url":"https://api.mygenomeservice.org/Handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0",

"note":"This handover link provides access to a summarized VCF."

}

]

}

{

"meta": {

"apiVersion": "v2.0",

"requestedSchemas": [{

"entityType": "EntryTypeA", 

"schema": “entry-typeA-schema-v2.0”

}]

},

"query": {

"requestParameters": {

"datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] }

},

"filters": [ 

{

"id": "EFO:0001212",

"scope": "biosamples"

}

],

"includeResultsetResponses": "HIT",

"pagination": { "skip": 0, "limit": 10 },

"requestedGranularity": “count"

}

}
Beacon Verifier
• Verify that all of your endpoints follow the
framework

• Optionally, you can verify that the returned
results match the model of the beacon
https://ga4gh-approval-service-registry-test.ega-archive.org
Questions
Break
How to implement a Beacon
• Endpoints

• Types of filters

• Mapping the DB to the BFF

• Database queries

• Pagination

• Responses
Endpoints
┌── common
├── configuration
├── endpoints.json
├── LICENSE
├── README.md
├── requests
└── responses
┌── analyses
│ ├── defaultSchema.json
│ ├── endpoints.json
│ └── filteringTerms.json
├── biosamples
│ ├── defaultSchema.json
│ ├── endpoints.json
│ ├── examples
│ └── filteringTerms.json
├── cohorts
│ ├── defaultSchema.json
│ ├── endpoints.json
│ ├── examples
│ └── filteringTerms.json
└── datasets
├── defaultSchema.json
├── endpoints.json
└── filteringTerms.json
┌── genomicVariations
│ ├── defaultSchema.json
│ ├── endpoints.json
│ ├── examples
│ ├── filteringTerms.json
│ ├── requestParameters.json
│ └── requestParametersComponents.json
├── individuals
│ ├── defaultSchema.json
│ ├── endpoints.json
│ ├── examples
│ └── filteringTerms.json
└── runs
├── defaultSchema.json
├── endpoints.json
└── filteringTerms.json
beacon-framework-v2 beacon-v2-Models
• Where can you find the endpoints
Endpoints
Framework endpoints Model endpoints
Endpoints: GET vs. POST
GET Request POST Request
{

"meta": {

"apiVersion": "2.0",

…

},

"query": {

"requestParameters": {

"datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] }

},

"filters": [ 

{

"id": "EFO:0001212",

"scope": "biosamples"

}

],

"pagination": { "skip": 0, "limit": 10 },

"requestedGranularity": "boolean"

}

}
?requestedSchema=beacon-individuals-v2.0&skip=0&limit=10
With query parameters: With body (application/json):
Endpoints: List your endpoints
{
"meta":{
"apiVersion": "v2.0.0",
"beaconId": “org.organizationName.beaconId",
"createDateTime": “2007-01-09",
"returnedSchemas": …,
"updateDateTime": "2021-11-16"
},
"response":{
"endpointSets": {
…
"individual": {
"endpoints": {
"biosample": {
"returnedEntryType": "biosample",
"url": "https://examplebeacons.org/individuals/{id}/biosamples"
},
"genomicVariation": {
"returnedEntryType": "genomicVariation",
"url": "https://examplebeacons.org/individuals/{id}/genomicVariations"
}
},
"entryType": "individual",
"filteringTermsUrl": "https://examplebeacons.org/filteringTerms",
"rootUrl": "https://examplebeacons.org/individuals",
"singleEntryUrl": "https://examplebeacons.org/individuals/{id}"
}
}
}
}
Filters: Types of filters
Ontology Filter
Filters: Types of filters
Alphanumeric Filter
Filters: Types of filters
Custom Filter
Filters: filters vs. requestParameters
Should it be a filter or a
request parameter?
Filter Request parameter
It requires its
own schema
It can be represented
with an ontology term
Anything else
Database mapping exercise
• Mapping the data of your database to the correct entities of the
model (and their properties)

• Extending the model to include additional entities that you may
provide and are not represented in the model
Database queries
• The new version of the Reference Implementation uses MongoDB:

• Each entity can be thought of as a collection

• Allows for a flexible evolution of the schema
Pagination
• We support two types of pagination:
skip & limit pagination cursor-like pagination
• We skip n elements and return the
next m elements.
• We add a hash to the response
encoding the next m elements of the
page
Error responses
{
"meta": …,
"error": {
"errorCode": 404,
"errorMessage": "Entry not found"
}
}
• Same meta as an OK response

• Error information
Tools provided
• Beacon-verifier
• Reference
Implementation • BFF utility
Coming soon
https://beacon-schema-2.readthedocs.io
Beacon Model viewer:
• Beacon Framework
• Beacon Model
Summary
• The Beacon Framework defines the structure of the response.

• The Beacon Model defines the structure of the response data.

• Implementing a beacon:

• Start with a boolean beacon

• List your available endpoints

• Map the data from your DB to the models

• Handle the different types of filters

• Build a response following the framework
Funding
This project has received funding from the
Canadian Institute of Health Research
under grant agreement #404896
This project has received funding from the
European Union's Horizon 2020 Research
and Innovation Programme under grant
agreement #825775
Questions

More Related Content

What's hot

Dependency property
Dependency propertyDependency property
Dependency property
msarangam
 

What's hot (10)

Play Your API with MuleSoft API Notebook
Play Your API with MuleSoft API NotebookPlay Your API with MuleSoft API Notebook
Play Your API with MuleSoft API Notebook
 
Implementing Authorization
Implementing AuthorizationImplementing Authorization
Implementing Authorization
 
Advance java session 11
Advance java session 11Advance java session 11
Advance java session 11
 
Mendix rest services
Mendix rest servicesMendix rest services
Mendix rest services
 
REST
RESTREST
REST
 
Sabrina Kirrane INSIGHT Viva Presentation
Sabrina Kirrane INSIGHT Viva Presentation Sabrina Kirrane INSIGHT Viva Presentation
Sabrina Kirrane INSIGHT Viva Presentation
 
Opa microservice authorization
Opa microservice authorizationOpa microservice authorization
Opa microservice authorization
 
Dependency property
Dependency propertyDependency property
Dependency property
 
GraphQL Security
GraphQL SecurityGraphQL Security
GraphQL Security
 
Kantara OTTO slides
Kantara OTTO slidesKantara OTTO slides
Kantara OTTO slides
 

Similar to Lighting a Beacon: training for (future) implementers

Similar to Lighting a Beacon: training for (future) implementers (20)

MongoDB Days UK: Building Apps with the MEAN Stack
MongoDB Days UK: Building Apps with the MEAN StackMongoDB Days UK: Building Apps with the MEAN Stack
MongoDB Days UK: Building Apps with the MEAN Stack
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVC Introduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Asp.Net MVC 5 in Arabic
Asp.Net MVC 5 in ArabicAsp.Net MVC 5 in Arabic
Asp.Net MVC 5 in Arabic
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service
 
Hypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsHypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of Things
 
angularJs Workshop
angularJs WorkshopangularJs Workshop
angularJs Workshop
 
Java UI Course Content
Java UI Course ContentJava UI Course Content
Java UI Course Content
 
A Beginner's Guide to Ember
A Beginner's Guide to EmberA Beginner's Guide to Ember
A Beginner's Guide to Ember
 
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
 
MongoDB World 2018: Evolving your Data Access with MongoDB Stitch
MongoDB World 2018: Evolving your Data Access with MongoDB StitchMongoDB World 2018: Evolving your Data Access with MongoDB Stitch
MongoDB World 2018: Evolving your Data Access with MongoDB Stitch
 
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS'sMongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
 
Hypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsHypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of Things
 
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDBIntroducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
 
Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDB
 
OSMC 2023 | Experiments with OpenSearch and AI by Jochen Kressin & Leanne La...
OSMC 2023 | Experiments with OpenSearch and AI by Jochen Kressin &  Leanne La...OSMC 2023 | Experiments with OpenSearch and AI by Jochen Kressin &  Leanne La...
OSMC 2023 | Experiments with OpenSearch and AI by Jochen Kressin & Leanne La...
 
PredictionIO – A Machine Learning Server in Scala – SF Scala
PredictionIO – A Machine Learning Server in Scala – SF ScalaPredictionIO – A Machine Learning Server in Scala – SF Scala
PredictionIO – A Machine Learning Server in Scala – SF Scala
 
Integrate MongoDB & SQL data with a single REST API
Integrate MongoDB & SQL data with a single REST APIIntegrate MongoDB & SQL data with a single REST API
Integrate MongoDB & SQL data with a single REST API
 
LeVan, "Search Web Services"
LeVan, "Search Web Services"LeVan, "Search Web Services"
LeVan, "Search Web Services"
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introduction
 

More from CINECAProject

CINECA webinar slides: Ethics/ELSI considerations - From FAIR to fair data sh...
CINECA webinar slides: Ethics/ELSI considerations - From FAIR to fair data sh...CINECA webinar slides: Ethics/ELSI considerations - From FAIR to fair data sh...
CINECA webinar slides: Ethics/ELSI considerations - From FAIR to fair data sh...
CINECAProject
 
CINECA webinar slides: How to make training FAIR
CINECA webinar slides: How to make training FAIRCINECA webinar slides: How to make training FAIR
CINECA webinar slides: How to make training FAIR
CINECAProject
 
CINECA webinar slides: Practically FAIR
CINECA webinar slides: Practically FAIRCINECA webinar slides: Practically FAIR
CINECA webinar slides: Practically FAIR
CINECAProject
 
CINECA webinar slides: FAIR software tools
CINECA webinar slides: FAIR software toolsCINECA webinar slides: FAIR software tools
CINECA webinar slides: FAIR software tools
CINECAProject
 
CINECA webinar slides: Making cohort data FAIR
CINECA webinar slides: Making cohort data FAIRCINECA webinar slides: Making cohort data FAIR
CINECA webinar slides: Making cohort data FAIR
CINECAProject
 
CINECA webinar slides: Open science through fair health data networks dream o...
CINECA webinar slides: Open science through fair health data networks dream o...CINECA webinar slides: Open science through fair health data networks dream o...
CINECA webinar slides: Open science through fair health data networks dream o...
CINECAProject
 
CINECA webinar slides: Data Gravity in the Life Sciences: Lessons learned fro...
CINECA webinar slides: Data Gravity in the Life Sciences: Lessons learned fro...CINECA webinar slides: Data Gravity in the Life Sciences: Lessons learned fro...
CINECA webinar slides: Data Gravity in the Life Sciences: Lessons learned fro...
CINECAProject
 
CINECA webinar slides: Status Update Code of Conduct: Teaming up & Talking ab...
CINECA webinar slides: Status Update Code of Conduct: Teaming up & Talking ab...CINECA webinar slides: Status Update Code of Conduct: Teaming up & Talking ab...
CINECA webinar slides: Status Update Code of Conduct: Teaming up & Talking ab...
CINECAProject
 
CINECA webinar slides: H3ABioNet Experiences in Phenotype Data Harmonisation ...
CINECA webinar slides: H3ABioNet Experiences in Phenotype Data Harmonisation ...CINECA webinar slides: H3ABioNet Experiences in Phenotype Data Harmonisation ...
CINECA webinar slides: H3ABioNet Experiences in Phenotype Data Harmonisation ...
CINECAProject
 
CINECA webinar slides: Ethical, legal and societal issues in international da...
CINECA webinar slides: Ethical, legal and societal issues in international da...CINECA webinar slides: Ethical, legal and societal issues in international da...
CINECA webinar slides: Ethical, legal and societal issues in international da...
CINECAProject
 

More from CINECAProject (12)

CINECA webinar slides: Modular and reproducible workflows for federated molec...
CINECA webinar slides: Modular and reproducible workflows for federated molec...CINECA webinar slides: Modular and reproducible workflows for federated molec...
CINECA webinar slides: Modular and reproducible workflows for federated molec...
 
Beacon v2 Reference Implementation: An Overview
Beacon v2 Reference Implementation: An OverviewBeacon v2 Reference Implementation: An Overview
Beacon v2 Reference Implementation: An Overview
 
CINECA webinar slides: Ethics/ELSI considerations - From FAIR to fair data sh...
CINECA webinar slides: Ethics/ELSI considerations - From FAIR to fair data sh...CINECA webinar slides: Ethics/ELSI considerations - From FAIR to fair data sh...
CINECA webinar slides: Ethics/ELSI considerations - From FAIR to fair data sh...
 
CINECA webinar slides: How to make training FAIR
CINECA webinar slides: How to make training FAIRCINECA webinar slides: How to make training FAIR
CINECA webinar slides: How to make training FAIR
 
CINECA webinar slides: Practically FAIR
CINECA webinar slides: Practically FAIRCINECA webinar slides: Practically FAIR
CINECA webinar slides: Practically FAIR
 
CINECA webinar slides: FAIR software tools
CINECA webinar slides: FAIR software toolsCINECA webinar slides: FAIR software tools
CINECA webinar slides: FAIR software tools
 
CINECA webinar slides: Making cohort data FAIR
CINECA webinar slides: Making cohort data FAIRCINECA webinar slides: Making cohort data FAIR
CINECA webinar slides: Making cohort data FAIR
 
CINECA webinar slides: Open science through fair health data networks dream o...
CINECA webinar slides: Open science through fair health data networks dream o...CINECA webinar slides: Open science through fair health data networks dream o...
CINECA webinar slides: Open science through fair health data networks dream o...
 
CINECA webinar slides: Data Gravity in the Life Sciences: Lessons learned fro...
CINECA webinar slides: Data Gravity in the Life Sciences: Lessons learned fro...CINECA webinar slides: Data Gravity in the Life Sciences: Lessons learned fro...
CINECA webinar slides: Data Gravity in the Life Sciences: Lessons learned fro...
 
CINECA webinar slides: Status Update Code of Conduct: Teaming up & Talking ab...
CINECA webinar slides: Status Update Code of Conduct: Teaming up & Talking ab...CINECA webinar slides: Status Update Code of Conduct: Teaming up & Talking ab...
CINECA webinar slides: Status Update Code of Conduct: Teaming up & Talking ab...
 
CINECA webinar slides: H3ABioNet Experiences in Phenotype Data Harmonisation ...
CINECA webinar slides: H3ABioNet Experiences in Phenotype Data Harmonisation ...CINECA webinar slides: H3ABioNet Experiences in Phenotype Data Harmonisation ...
CINECA webinar slides: H3ABioNet Experiences in Phenotype Data Harmonisation ...
 
CINECA webinar slides: Ethical, legal and societal issues in international da...
CINECA webinar slides: Ethical, legal and societal issues in international da...CINECA webinar slides: Ethical, legal and societal issues in international da...
CINECA webinar slides: Ethical, legal and societal issues in international da...
 

Recently uploaded

Call Girl In Pune 👉 Just CALL ME: 9352988975 💋 Call Out Call Both With High p...
Call Girl In Pune 👉 Just CALL ME: 9352988975 💋 Call Out Call Both With High p...Call Girl In Pune 👉 Just CALL ME: 9352988975 💋 Call Out Call Both With High p...
Call Girl In Pune 👉 Just CALL ME: 9352988975 💋 Call Out Call Both With High p...
chetankumar9855
 
Dehradun Call Girls Service {8854095900} ❤️VVIP ROCKY Call Girl in Dehradun U...
Dehradun Call Girls Service {8854095900} ❤️VVIP ROCKY Call Girl in Dehradun U...Dehradun Call Girls Service {8854095900} ❤️VVIP ROCKY Call Girl in Dehradun U...
Dehradun Call Girls Service {8854095900} ❤️VVIP ROCKY Call Girl in Dehradun U...
Sheetaleventcompany
 

Recently uploaded (20)

Independent Call Girls In Jaipur { 8445551418 } ✔ ANIKA MEHTA ✔ Get High Prof...
Independent Call Girls In Jaipur { 8445551418 } ✔ ANIKA MEHTA ✔ Get High Prof...Independent Call Girls In Jaipur { 8445551418 } ✔ ANIKA MEHTA ✔ Get High Prof...
Independent Call Girls In Jaipur { 8445551418 } ✔ ANIKA MEHTA ✔ Get High Prof...
 
Call Girls in Delhi Triveni Complex Escort Service(🔝))/WhatsApp 97111⇛47426
Call Girls in Delhi Triveni Complex Escort Service(🔝))/WhatsApp 97111⇛47426Call Girls in Delhi Triveni Complex Escort Service(🔝))/WhatsApp 97111⇛47426
Call Girls in Delhi Triveni Complex Escort Service(🔝))/WhatsApp 97111⇛47426
 
Top Rated Pune Call Girls (DIPAL) ⟟ 8250077686 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls (DIPAL) ⟟ 8250077686 ⟟ Call Me For Genuine Sex Serv...Top Rated Pune Call Girls (DIPAL) ⟟ 8250077686 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls (DIPAL) ⟟ 8250077686 ⟟ Call Me For Genuine Sex Serv...
 
Top Rated Hyderabad Call Girls Chintal ⟟ 9332606886 ⟟ Call Me For Genuine Se...
Top Rated  Hyderabad Call Girls Chintal ⟟ 9332606886 ⟟ Call Me For Genuine Se...Top Rated  Hyderabad Call Girls Chintal ⟟ 9332606886 ⟟ Call Me For Genuine Se...
Top Rated Hyderabad Call Girls Chintal ⟟ 9332606886 ⟟ Call Me For Genuine Se...
 
Call Girls Amritsar Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Amritsar Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Amritsar Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Amritsar Just Call 8250077686 Top Class Call Girl Service Available
 
Call Girls Service Jaipur {8445551418} ❤️VVIP BHAWNA Call Girl in Jaipur Raja...
Call Girls Service Jaipur {8445551418} ❤️VVIP BHAWNA Call Girl in Jaipur Raja...Call Girls Service Jaipur {8445551418} ❤️VVIP BHAWNA Call Girl in Jaipur Raja...
Call Girls Service Jaipur {8445551418} ❤️VVIP BHAWNA Call Girl in Jaipur Raja...
 
Saket * Call Girls in Delhi - Phone 9711199012 Escorts Service at 6k to 50k a...
Saket * Call Girls in Delhi - Phone 9711199012 Escorts Service at 6k to 50k a...Saket * Call Girls in Delhi - Phone 9711199012 Escorts Service at 6k to 50k a...
Saket * Call Girls in Delhi - Phone 9711199012 Escorts Service at 6k to 50k a...
 
Models Call Girls In Hyderabad 9630942363 Hyderabad Call Girl & Hyderabad Esc...
Models Call Girls In Hyderabad 9630942363 Hyderabad Call Girl & Hyderabad Esc...Models Call Girls In Hyderabad 9630942363 Hyderabad Call Girl & Hyderabad Esc...
Models Call Girls In Hyderabad 9630942363 Hyderabad Call Girl & Hyderabad Esc...
 
Top Rated Hyderabad Call Girls Erragadda ⟟ 9332606886 ⟟ Call Me For Genuine ...
Top Rated  Hyderabad Call Girls Erragadda ⟟ 9332606886 ⟟ Call Me For Genuine ...Top Rated  Hyderabad Call Girls Erragadda ⟟ 9332606886 ⟟ Call Me For Genuine ...
Top Rated Hyderabad Call Girls Erragadda ⟟ 9332606886 ⟟ Call Me For Genuine ...
 
VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋
VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋
VIP Hyderabad Call Girls Bahadurpally 7877925207 ₹5000 To 25K With AC Room 💚😋
 
Top Rated Call Girls Kerala ☎ 8250092165👄 Delivery in 20 Mins Near Me
Top Rated Call Girls Kerala ☎ 8250092165👄 Delivery in 20 Mins Near MeTop Rated Call Girls Kerala ☎ 8250092165👄 Delivery in 20 Mins Near Me
Top Rated Call Girls Kerala ☎ 8250092165👄 Delivery in 20 Mins Near Me
 
Call Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service Available
Call Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service AvailableCall Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service Available
Call Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service Available
 
Andheri East ) Call Girls in Mumbai Phone No 9004268417 Elite Escort Service ...
Andheri East ) Call Girls in Mumbai Phone No 9004268417 Elite Escort Service ...Andheri East ) Call Girls in Mumbai Phone No 9004268417 Elite Escort Service ...
Andheri East ) Call Girls in Mumbai Phone No 9004268417 Elite Escort Service ...
 
Call Girls Varanasi Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Varanasi Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 8250077686 Top Class Call Girl Service Available
 
Call Girls Hyderabad Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Hyderabad Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Hyderabad Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Hyderabad Just Call 8250077686 Top Class Call Girl Service Available
 
Call Girls Mysore Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Mysore Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Mysore Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Mysore Just Call 8250077686 Top Class Call Girl Service Available
 
Russian Call Girls Service Jaipur {8445551418} ❤️PALLAVI VIP Jaipur Call Gir...
Russian Call Girls Service  Jaipur {8445551418} ❤️PALLAVI VIP Jaipur Call Gir...Russian Call Girls Service  Jaipur {8445551418} ❤️PALLAVI VIP Jaipur Call Gir...
Russian Call Girls Service Jaipur {8445551418} ❤️PALLAVI VIP Jaipur Call Gir...
 
Most Beautiful Call Girl in Bangalore Contact on Whatsapp
Most Beautiful Call Girl in Bangalore Contact on WhatsappMost Beautiful Call Girl in Bangalore Contact on Whatsapp
Most Beautiful Call Girl in Bangalore Contact on Whatsapp
 
Call Girl In Pune 👉 Just CALL ME: 9352988975 💋 Call Out Call Both With High p...
Call Girl In Pune 👉 Just CALL ME: 9352988975 💋 Call Out Call Both With High p...Call Girl In Pune 👉 Just CALL ME: 9352988975 💋 Call Out Call Both With High p...
Call Girl In Pune 👉 Just CALL ME: 9352988975 💋 Call Out Call Both With High p...
 
Dehradun Call Girls Service {8854095900} ❤️VVIP ROCKY Call Girl in Dehradun U...
Dehradun Call Girls Service {8854095900} ❤️VVIP ROCKY Call Girl in Dehradun U...Dehradun Call Girls Service {8854095900} ❤️VVIP ROCKY Call Girl in Dehradun U...
Dehradun Call Girls Service {8854095900} ❤️VVIP ROCKY Call Girl in Dehradun U...
 

Lighting a Beacon: training for (future) implementers

  • 1. This project has received funding from the European Union’s Horizon 2020 research and Innovation programme under grant agreement No. 825775 This project has received funding from the Canadian Institute of Health Research under grant agreement #404896 Lighting a Beacon: Training for (future) implementers
  • 2. Who is this talk for? Beacon implementors and software developers Beacon users
  • 3. Contents • Beacon Framework • Beacon Model • How to start implementing a beacon from scratch PART 1 PART 2
  • 4. What is Beacon? HTTP API DB Request (GET or POST + JSON) Response (JSON) Framework Model
  • 5. Beacon Framework Framework Model • Specifies the structure of the wrapper of the results. • Allows the interoperability of beacons with different data, since they all understand the same protocol.
  • 6. Beacon Framework: Types of beacon Framework Model Boolean Beacon Count Beacon ResultSets Beacon
  • 7. Beacon Model Framework Model • Describes the entities that the beacon supports. • Describes the schemas of those entities.
  • 8. Beacon Model: Entities Analyses Biosamples Cohorts Datasets Genomic Variations Individuals Runs Framework Model https://beacon-schema-2.readthedocs.io Beacon Model viewer:
  • 9. Example request & response Request Response { "meta": { "beaconId":"org.example.beacon.v2", "apiVersion": "v2.0", "returnedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ], "receivedRequestSummary": { "apiVersion": "v2.0", "filters": …, "requestParameters": …, "includeResultsetResponses": "HIT", "requestedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ], "pagination": { "skip": 0, “limit":10 }, “requestedGranularity”: “count” } }, "responseSummary":{ "exists": true, "numTotalResults": 25355 }, "info": { "someInterestingStuff": "this is the interesting stuff" }, “beaconHandovers":[ { "handoverType": { "id":"EFO:0004157", "label":"BAM format" }, "url":"https://api.mygenomeservice.org/Handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0", "note":"This handover link provides access to a summarized VCF." } ] { "meta": { "apiVersion": "v2.0", "requestedSchemas": [{ "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0” }] }, "query": { "requestParameters": { "datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] } }, "filters": [ { "id": "EFO:0001212", "scope": "biosamples" } ], "includeResultsetResponses": "HIT", "pagination": { "skip": 0, "limit": 10 }, "requestedGranularity": “count" } }
  • 10. Example request Request { "meta": { "apiVersion": "v2.0", "requestedSchemas": [{ "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0” }] }, "query": { "requestParameters": { "datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] } }, "filters": [ { "id": "EFO:0001212", "scope": "biosamples" } ], "includeResultsetResponses": "HIT", "pagination": { "skip": 0, "limit": 10 }, "requestedGranularity": "count" } }
  • 11. Example request & response Request Response { "meta": { "beaconId":"org.example.beacon.v2", "apiVersion": "v2.0", "returnedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ], "returnedGranularity": "count", "receivedRequestSummary": { "apiVersion": "v2.0", "filters": …, "requestParameters": …, "includeResultsetResponses": "HIT", "requestedSchemas": [ { "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0”} ], "pagination": { "skip": 0, “limit":10 }, “requestedGranularity”: “count” } }, "responseSummary":{ "exists": true, "numTotalResults": 25355 }, "info": { "someInterestingStuff": "this is the interesting stuff" }, “beaconHandovers":[ { "handoverType": { "id":"EFO:0004157", "label":"BAM format" }, "url":"https://api.mygenomeservice.org/Handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0", "note":"This handover link provides access to a summarized VCF." } ] } { "meta": { "apiVersion": "v2.0", "requestedSchemas": [{ "entityType": "EntryTypeA", "schema": “entry-typeA-schema-v2.0” }] }, "query": { "requestParameters": { "datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] } }, "filters": [ { "id": "EFO:0001212", "scope": "biosamples" } ], "includeResultsetResponses": "HIT", "pagination": { "skip": 0, "limit": 10 }, "requestedGranularity": “count" } }
  • 12. Beacon Verifier • Verify that all of your endpoints follow the framework • Optionally, you can verify that the returned results match the model of the beacon https://ga4gh-approval-service-registry-test.ega-archive.org
  • 14. Break
  • 15. How to implement a Beacon • Endpoints • Types of filters • Mapping the DB to the BFF • Database queries • Pagination • Responses
  • 16. Endpoints ┌── common ├── configuration ├── endpoints.json ├── LICENSE ├── README.md ├── requests └── responses ┌── analyses │ ├── defaultSchema.json │ ├── endpoints.json │ └── filteringTerms.json ├── biosamples │ ├── defaultSchema.json │ ├── endpoints.json │ ├── examples │ └── filteringTerms.json ├── cohorts │ ├── defaultSchema.json │ ├── endpoints.json │ ├── examples │ └── filteringTerms.json └── datasets ├── defaultSchema.json ├── endpoints.json └── filteringTerms.json ┌── genomicVariations │ ├── defaultSchema.json │ ├── endpoints.json │ ├── examples │ ├── filteringTerms.json │ ├── requestParameters.json │ └── requestParametersComponents.json ├── individuals │ ├── defaultSchema.json │ ├── endpoints.json │ ├── examples │ └── filteringTerms.json └── runs ├── defaultSchema.json ├── endpoints.json └── filteringTerms.json beacon-framework-v2 beacon-v2-Models • Where can you find the endpoints
  • 18. Endpoints: GET vs. POST GET Request POST Request { "meta": { "apiVersion": "2.0", … }, "query": { "requestParameters": { "datasets": { "datasetIds": ["DatasetXYZ", "Dataset123"] } }, "filters": [ { "id": "EFO:0001212", "scope": "biosamples" } ], "pagination": { "skip": 0, "limit": 10 }, "requestedGranularity": "boolean" } } ?requestedSchema=beacon-individuals-v2.0&skip=0&limit=10 With query parameters: With body (application/json):
  • 19. Endpoints: List your endpoints { "meta":{ "apiVersion": "v2.0.0", "beaconId": “org.organizationName.beaconId", "createDateTime": “2007-01-09", "returnedSchemas": …, "updateDateTime": "2021-11-16" }, "response":{ "endpointSets": { … "individual": { "endpoints": { "biosample": { "returnedEntryType": "biosample", "url": "https://examplebeacons.org/individuals/{id}/biosamples" }, "genomicVariation": { "returnedEntryType": "genomicVariation", "url": "https://examplebeacons.org/individuals/{id}/genomicVariations" } }, "entryType": "individual", "filteringTermsUrl": "https://examplebeacons.org/filteringTerms", "rootUrl": "https://examplebeacons.org/individuals", "singleEntryUrl": "https://examplebeacons.org/individuals/{id}" } } } }
  • 20. Filters: Types of filters Ontology Filter
  • 21. Filters: Types of filters Alphanumeric Filter
  • 22. Filters: Types of filters Custom Filter
  • 23. Filters: filters vs. requestParameters Should it be a filter or a request parameter? Filter Request parameter It requires its own schema It can be represented with an ontology term Anything else
  • 24. Database mapping exercise • Mapping the data of your database to the correct entities of the model (and their properties) • Extending the model to include additional entities that you may provide and are not represented in the model
  • 25. Database queries • The new version of the Reference Implementation uses MongoDB: • Each entity can be thought of as a collection • Allows for a flexible evolution of the schema
  • 26. Pagination • We support two types of pagination: skip & limit pagination cursor-like pagination • We skip n elements and return the next m elements. • We add a hash to the response encoding the next m elements of the page
  • 27. Error responses { "meta": …, "error": { "errorCode": 404, "errorMessage": "Entry not found" } } • Same meta as an OK response • Error information
  • 28. Tools provided • Beacon-verifier • Reference Implementation • BFF utility Coming soon https://beacon-schema-2.readthedocs.io Beacon Model viewer: • Beacon Framework • Beacon Model
  • 29. Summary • The Beacon Framework defines the structure of the response. • The Beacon Model defines the structure of the response data. • Implementing a beacon: • Start with a boolean beacon • List your available endpoints • Map the data from your DB to the models • Handle the different types of filters • Build a response following the framework
  • 30. Funding This project has received funding from the Canadian Institute of Health Research under grant agreement #404896 This project has received funding from the European Union's Horizon 2020 Research and Innovation Programme under grant agreement #825775