|
| 1 | +# Variation Representation Specification (VRS) |
| 2 | + |
1 | 3 | [](https://zenodo.org/badge/latestdoi/67005248)
|
2 | 4 | [](https://vrs.ga4gh.org/)
|
3 | 5 | [](https://github.com/ga4gh/vrs/actions/workflows/tests.yml)
|
4 | 6 |
|
5 |
| -The [GA4GH](https://www.ga4gh.org/) [Variation Representation |
6 |
| -Specification](https://vrs.ga4gh.org/) provides a |
7 |
| -comprehensive framework for the computational representation of |
8 |
| -biological sequence variation. VRS is the result of a |
9 |
| -collaboration among [contributors](CONTRIBUTORS.md) representing |
10 |
| -national information resource providers, major international public |
11 |
| -initiatives, and diagnostic testing laboratories. |
| 7 | +The [GA4GH](https://www.ga4gh.org/) [Variation Representation Specification](https://vrs.ga4gh.org/) |
| 8 | +provides a comprehensive framework for the computational representation of biological sequence |
| 9 | +variation. VRS is the result of a collaboration among [contributors](CONTRIBUTORS.md) representing |
| 10 | +national information resource providers, major international public initiatives, and diagnostic |
| 11 | +testing laboratories. |
12 | 12 |
|
13 | 13 | VRS is licensed under the [Apache License 2.0](LICENSE).
|
14 | 14 |
|
| 15 | +> **NOTE:** VRS is under active development. |
| 16 | +> See the [VRS Project Roadmap](https://github.com/orgs/ga4gh/projects/12). |
15 | 17 |
|
16 |
| -> **NOTE:** VRS is under active development. See [VR |
17 |
| -> Project Roadmap](https://github.com/orgs/ga4gh/projects/5). |
18 |
| -
|
| 18 | +## Specific goals |
19 | 19 |
|
20 |
| -# Specific goals: |
21 |
| - |
22 |
| -* Develop common language- and protocol-neutral information models and |
23 |
| - nomenclature for biological sequence variation. |
24 |
| -* From the information models, develop data schemas. The current |
25 |
| - schema is defined in JSON Schema, but other formats are expected. |
26 |
| -* Provide algorithmic guidance and conventions to minimize |
27 |
| - representational ambiguity. |
28 |
| -* Define a globally unique *computed identifier* for covered data |
29 |
| - classes. |
30 |
| -* Develop [validation |
31 |
| - tests](https://github.com/ga4gh/vrs/tree/main/validation) to ensure |
| 20 | +* Develop common language and protocol-neutral information models and nomenclature for |
| 21 | + biological sequence variation. |
| 22 | +* From the information models, develop data schemas. The current schema is defined in |
| 23 | + JSON Schema, but other formats are expected. |
| 24 | +* Provide algorithmic guidance and conventions to minimize representational ambiguity. |
| 25 | +* Define a globally unique *computed identifier* for covered data classes. |
| 26 | +* Develop [validation tests](https://github.com/ga4gh/vrs/tree/main/validation) to ensure |
32 | 27 | consistency of implementations.
|
33 | 28 |
|
34 |
| -The VRS model is the product of the [GA4GH Variation Representation |
35 |
| -group](https://ga4gh-gks.github.io/variant_representation.html). |
36 |
| - |
37 |
| - |
38 |
| -> **SEE ALSO**: See [vrs-python](https://github.com/ga4gh/vrs-python) |
39 |
| -> for an implementation and Jupyter notebooks. |
40 |
| -
|
41 |
| - |
42 |
| -# Using the schema |
| 29 | +The VRS model is the product of the [GA4GH Variation Representation group](https://www.ga4gh.org/product/variation-representation/). |
43 | 30 |
|
44 |
| -The schema is available in the `schema/` directory, in both yaml and |
45 |
| -json versions. It conforms to JSON Schema draft-07. For a list of |
46 |
| -libraries that support JSON schema, see [JSON |
47 |
| -Schema>Implementations](https://json-schema.org/implementations.html). |
| 31 | +> **SEE ALSO**: See [VRS-Python](https://github.com/ga4gh/vrs-python) for a Python |
| 32 | +> implementation and Jupyter notebooks. |
48 | 33 |
|
| 34 | +## Using the schema |
49 | 35 |
|
| 36 | +The schema is available in the [schema/](./schema/) directory, in both yaml and json versions. |
| 37 | +It conforms to JSON Schema draft-07. For a list of libraries that support JSON schema, |
| 38 | +see [JSONSchema>Implementations](https://json-schema.org/implementations.html). |
50 | 39 |
|
51 |
| -# Contributing to the schema |
| 40 | +## Installing for development |
52 | 41 |
|
53 |
| -VRS uses yaml as the source document for JSON Schema |
| 42 | +Fork the repo at <https://github.com/ga4gh/vrs>. |
54 | 43 |
|
55 |
| -To convert vrs.yaml to vrs.json: |
| 44 | + git clone --recurse-submodules [email protected]:YOUR_GITHUB_ID/vrs.git |
| 45 | + cd vrs |
| 46 | + make devready |
| 47 | + source venv/3.12/bin/activate |
56 | 48 |
|
57 |
| - make vrs.json |
| 49 | +If you already cloned the repo, but forgot to include `--recurse-submodules` you can run: |
58 | 50 |
|
59 |
| -You'll probably have to `pip install pyyaml` first. |
| 51 | + git submodule update --init --recursive |
60 | 52 |
|
61 |
| -To watch for changes and update automatically: |
| 53 | +## Contributing to the schema |
62 | 54 |
|
63 |
| - make -C schema watch & |
| 55 | +VRS uses [vrs-source.yaml](./schema//vrs/vrs-source.yaml) as the source document for JSON Schema. |
64 | 56 |
|
| 57 | +To create the corresponding def and json files after making changes to the source document, from the root directory: |
65 | 58 |
|
66 |
| -# Contributing docs |
| 59 | + cd schema |
| 60 | + make all |
67 | 61 |
|
68 |
| -The VR specification documentation is written in reStructuredText and |
69 |
| -located in `docs/source/`. Commits to this repo are built |
70 |
| -automatically at `vrs.ga4gh.org`. |
| 62 | +## Contributing to the docs |
71 | 63 |
|
72 |
| -To build documentation locally, type: |
| 64 | +The VRS specification documentation is written in reStructuredText and located in [docs/source](docs/source/). Commits to this repo are built automatically at <https://vrs.ga4gh.org>. |
73 | 65 |
|
74 |
| - make -C docs clean watch & |
| 66 | +To build documentation locally, you must install `entr`: |
75 | 67 |
|
76 |
| -Then, open `docs/build/html/index.html`. The above make command |
77 |
| -should build docs when source changes. (Some types of changes require |
78 |
| -recleaning and building.) |
| 68 | + brew install entr |
79 | 69 |
|
| 70 | +Then from the root directory: |
80 | 71 |
|
81 |
| -# Testing |
| 72 | + cd docs |
| 73 | + make clean watch & |
82 | 74 |
|
83 |
| -The VRS repo contains two kinds of tests. Basic smoketests in `tests/` |
84 |
| -ensure that the schema is parseable and works with certain tools. |
85 |
| -These tests provide a basic sanity check during development. |
| 75 | +Then, open `docs/build/html/index.html`. The above make command should build docs when |
| 76 | +source changes. (Some types of changes require recleaning and building.) |
86 | 77 |
|
87 |
| -Validation tests (in `validation/`) provide language-neutral tests for |
88 |
| -those implementing tools with VRS. |
| 78 | +## Testing |
89 | 79 |
|
90 |
| -## Using smoketests |
| 80 | +The VRS repo contains two kinds of tests. Basic smoke tests in `tests/` ensure that the |
| 81 | +schema is parsable and works with certain tools. These tests provide a basic sanity |
| 82 | +check during development. |
91 | 83 |
|
92 |
| -The smoketests require python 3.8+. This is the recommended setup: |
| 84 | +Validation tests (in `validation/`) provide language-neutral tests for those implementing |
| 85 | +tools with VRS. |
93 | 86 |
|
94 |
| -``` |
95 |
| -$ python3 -m venv venv |
96 |
| -$ source venv/bin/activate |
97 |
| -$ pip install -U setuptools pip |
98 |
| -$ pip install -r .requirements.txt |
99 |
| -$ python3 -m pytest |
| 87 | +To run the smoke tests: |
100 | 88 |
|
101 |
| -``` |
| 89 | + make test |
0 commit comments