Skip to content

Commit

Permalink
VRS references from 1.2 => 1.3
Browse files Browse the repository at this point in the history
The Beacon schema for genomic allows 3 options:

* VRS MolecularVariation
* VRS SystemicVariation
* Beacon LegacyVariation (which adopts the VRS location object but uses separate definitions otherwise)

Unfortunately, during Beacon v2 approval only VRS 1.2. was available and then explicitly referenced in the schema. It fast superseded by 1.3 which allows a *much* better definition of "Systemic Variations" such as CNV.

This PR changes all VRS references from 1.2 => 1.3 and should be very welcome to implementers (1.3. has been the longstanding standard now until the future 2.x is out; in fact, the `bycon` based implementations such as progenetix.org have been using it for their Beacons for ~2years).
  • Loading branch information
mbaudis committed Nov 16, 2024
1 parent beeb5f9 commit c634b81
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions bin/beacon_yaml2md.pl
Original file line number Diff line number Diff line change
Expand Up @@ -729,9 +729,9 @@ sub add_properties_vrs {
my ( $property, $data ) = @_;
my %url = (
'SequenceExpression' =>
'https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/',
'https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/',
'CopyNumber' =>
'https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/'
'https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/'
);
if ( exists $url{$property} ) {
$data->{properties} =
Expand Down
2 changes: 1 addition & 1 deletion bin/deref_schemas/obj/CopyNumber.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
CopyNumber:
properties: '[VRS definition for CopyNumber](https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/CopyNumber)'
properties: '[VRS definition for CopyNumber](https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/CopyNumber)'
type: allOf
2 changes: 1 addition & 1 deletion docs/schemas-md/obj/CopyNumber.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
|Term | Description | Type | Properties | Example | Enum|
| ---| ---| ---| ---| ---| --- |
| CopyNumber | NA | allOf | [VRS definition for CopyNumber](https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/CopyNumber) | NA | NA|
| CopyNumber | NA | allOf | [VRS definition for CopyNumber](https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/CopyNumber) | NA | NA|
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$comment": "version: ga4gh-beacon-variant-v2.0.0",
"$comment": "version: ga4gh-beacon-variant-v2.1.0",
"$defs": {
"CaseLevelVariant": {
"description": "",
Expand Down Expand Up @@ -272,7 +272,7 @@
"type": "string"
},
"location": {
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/Location"
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/Location"
},
"referenceBases": {
"description": "Reference bases for this variant (starting from `start`). * Accepted values: IUPAC codes for nucleotides (e.g. `https://www.bioinformatics.org/sms/iupac.html`). * N is a wildcard, that denotes the position of any base, and can be used\n as a standalone base of any type or within a partially known sequence.\n* an *empty value* is used in the case of insertions with the maximally\n trimmed, inserted sequence being indicated in `AlternateBases`.",
Expand Down Expand Up @@ -557,10 +557,10 @@
"variation": {
"oneOf": [
{
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/MolecularVariation"
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/MolecularVariation"
},
{
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/SystemicVariation"
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/SystemicVariation"
},
{
"$ref": "#/$defs/LegacyVariation"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://json-schema.org/draft/2020-12/schema
title: Genomic Variation
$comment: 'version: ga4gh-beacon-variant-v2.0.0'
$comment: 'version: ga4gh-beacon-variant-v2.1.0'
description: >-
Schema for a genomic variant entry.
type: object
Expand All @@ -10,8 +10,8 @@ required:
properties:
variation:
oneOf:
- $ref: https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/MolecularVariation
- $ref: https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/SystemicVariation
- $ref: https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/MolecularVariation
- $ref: https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/SystemicVariation
- $ref: '#/$defs/LegacyVariation'
variantInternalId:
description: >-
Expand Down Expand Up @@ -51,7 +51,7 @@ $defs:
- location
properties:
location:
$ref: https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/Location
$ref: https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/Location
variantType:
description: >-
The `variantType` declares the nature of the variation in relation
Expand Down

0 comments on commit c634b81

Please sign in to comment.