#genetics #http #api #jsonschema #validation

app beacon-verifier

Compliance tool to verify beacon implementations

18 releases

Uses new Rust 2021

0.3.2 Nov 29, 2021
0.3.1 Nov 29, 2021
0.2.8 Oct 29, 2021
0.2.2 Sep 30, 2021
0.1.3 Jul 22, 2021

#128 in Testing

Download history 5/week @ 2022-01-25 6/week @ 2022-02-01 3/week @ 2022-02-08 19/week @ 2022-02-15 8/week @ 2022-02-22 1/week @ 2022-03-01 19/week @ 2022-03-08 56/week @ 2022-03-15 54/week @ 2022-03-22 12/week @ 2022-04-05 56/week @ 2022-04-26 122/week @ 2022-05-03 272/week @ 2022-05-10

450 downloads per month

Apache-2.0

190KB
1K SLoC

Beacon verifier

beacon-verifier.001.png

Installation

Requirements: Rust Minimum Rust version: 1.56

cargo install beacon-verifier

Usage

You can specify one or multiple urls:

beacon-verifier https://beacon-url.com/

By default, the Beacon v2 model is being used. But you can provide your own model with the --model option. The model should follow the Beacon Framework.

beacon-verifier --model https://beacon-model.com/ https://beacon-url.com/

Alternatively, you can specify a local path for the model:

beacon-verifier --model file://$PWD/tests/BEACON-V2-draft4-Model https://beacon-url.com/

Output

The output is a JSON file written to stdout. You can redirect it to save it into a file.

beacon-verifier https://beacon-url.com/ > /path/to/output

Output example

[
    {
        "name": "Beacon Name",
        "url": "https://...",
        "entities": {
            "individuals": {
                "name": "Individuals",
                "url": "https://.../individuals",
                "valid": true,
                "error": null,
            },
            "variants": {
                "name": "Variants",
                "url": "https://.../variants",
                "valid": false,
                "error": "Bad schema"
            },
            "biosamples": {
                "name": "Biosamples",
                "url": "https://.../biosamples",
                "valid": null,
                "error": "Unresponsive endpoint"
            }
        }
    }
]

Output format

The output is a Vec<Beacon> with the following format:

struct Beacon {
    name: String,
    url: String,
    entities: Vec<Entity>
}

struct Entity {
    name: String,
    url: String,
    valid: Option<bool>,
    error: Option<VerifierError>
}

Dependencies

~18–28MB
~609K SLoC