Skip to content

Cafe-Variome/Beacon-in-a-box

Repository files navigation

Beacon v2.x

This repository is a modified version of the Beacon2 Reference Implementation (B2RI) and contains a stand-alone Beacon instance designed to allow for the sharing of metadata of datasets.

This repo contains:

Local installation instructions

Importing metadata into the Beacon-in-a-box

To import metadata into your Beacon instance please use the Beacon-import-tools.

Usage

You can query the beacon using GET or POST. Below, you can find some examples of usage:

For simplicity (and readability), we will be using HTTPie.

Using GET

Querying this endpoit it should return the 13 variants of the beacon (paginated):

http GET http://localhost:5050/api/g_variants/

You can also add request parameters to the query, like so:

http GET http://localhost:5050/api/g_variants/?start=9411499,9411644&end=9411609

This should return 3 genomic variants.

Using POST

You can use POST to make the previous query. With a request.json file like this one:

{
    "meta": {
        "apiVersion": "2.0"
    },
    "query": {
        "requestParameters": {
            "start": [ 9411499, 9411644 ],
            "end": [ 9411609 ]
        },
        "filters": [],
        "includeResultsetResponses": "HIT",
        "pagination": {
            "skip": 0,
            "limit": 10
        },
        "testMode": false,
        "requestedGranularity": "count"
    }
}

You can execute:

http POST http://localhost:5050/api/g_variants/ --json < request.json

But you can also use complex filters:

{
    "meta": {
        "apiVersion": "2.0"
    },
    "query": {
        "filters": [
            {
                "id": "UBERON:0001256",
                "scope": "biosamples",
                "includeDescendantTerms": false
            }
        ],
        "includeResultsetResponses": "HIT",
        "pagination": {
            "skip": 0,
            "limit": 10
        },
        "testMode": false,
        "requestedGranularity": "count"
    }
}

You can execute:

http POST http://localhost:5050/api/biosamples/ --json < request.json

And it will use the ontology filter to filter the results.

Version notes

  • Fusions (mateName) are not supported.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors