#genetics #http #api #jsonschema #validation

app beacon-verifier

Compliance tool to verify beacon implementations

4 releases

new 0.1.3 Jul 22, 2021
0.1.2 Jul 16, 2021
0.1.1 Jul 15, 2021
0.1.0 Jul 15, 2021

#137 in Testing

25 downloads per month

Apache-2.0

185KB
588 lines

Beacon verifier

beacon-verifier.001.png

Installation

Requirements: Rust

cargo install beacon-verifier

Usage

You can specify one or multiple urls:

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

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

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

Alternatively, you can specify a local specification:

beacon-verifier --spec 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
            },
            "variants": {
                "name": "Variants",
                "url": "https://.../variants",
                "valid": false
            },
            "biosamples": {
                "name": "Biosamples",
                "url": "https://.../biosamples",
                "valid": null
            }
        }
    }
]

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>
}

Dependencies

~25MB
~623K SLoC