From c634b81c6c012c0d2973fcf256df762c5fbb0516 Mon Sep 17 00:00:00 2001 From: Michael Baudis Date: Sat, 16 Nov 2024 09:08:49 +0900 Subject: [PATCH 1/2] VRS references from 1.2 => 1.3 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). --- bin/beacon_yaml2md.pl | 4 ++-- bin/deref_schemas/obj/CopyNumber.yaml | 2 +- docs/schemas-md/obj/CopyNumber.md | 2 +- .../genomicVariations/defaultSchema.json | 8 ++++---- .../genomicVariations/defaultSchema.yaml | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/beacon_yaml2md.pl b/bin/beacon_yaml2md.pl index 9fc75fe5..1285de4d 100755 --- a/bin/beacon_yaml2md.pl +++ b/bin/beacon_yaml2md.pl @@ -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} = diff --git a/bin/deref_schemas/obj/CopyNumber.yaml b/bin/deref_schemas/obj/CopyNumber.yaml index 37906e03..ec96fa12 100644 --- a/bin/deref_schemas/obj/CopyNumber.yaml +++ b/bin/deref_schemas/obj/CopyNumber.yaml @@ -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 diff --git a/docs/schemas-md/obj/CopyNumber.md b/docs/schemas-md/obj/CopyNumber.md index 88e7a5ee..e55d7cca 100644 --- a/docs/schemas-md/obj/CopyNumber.md +++ b/docs/schemas-md/obj/CopyNumber.md @@ -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| diff --git a/models/json/beacon-v2-default-model/genomicVariations/defaultSchema.json b/models/json/beacon-v2-default-model/genomicVariations/defaultSchema.json index 394bef5c..19d42db1 100644 --- a/models/json/beacon-v2-default-model/genomicVariations/defaultSchema.json +++ b/models/json/beacon-v2-default-model/genomicVariations/defaultSchema.json @@ -1,5 +1,5 @@ { - "$comment": "version: ga4gh-beacon-variant-v2.0.0", + "$comment": "version: ga4gh-beacon-variant-v2.1.0", "$defs": { "CaseLevelVariant": { "description": "", @@ -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`.", @@ -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" diff --git a/models/src/beacon-v2-default-model/genomicVariations/defaultSchema.yaml b/models/src/beacon-v2-default-model/genomicVariations/defaultSchema.yaml index b5e5cc9e..df68f4d7 100644 --- a/models/src/beacon-v2-default-model/genomicVariations/defaultSchema.yaml +++ b/models/src/beacon-v2-default-model/genomicVariations/defaultSchema.yaml @@ -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 @@ -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: >- @@ -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 From b1f81dcf9e280f79e3db5050a623bbb2bbd4addb Mon Sep 17 00:00:00 2001 From: Michael Baudis Date: Sat, 16 Nov 2024 09:22:14 +0900 Subject: [PATCH 2/2] removing the schema deparser changes The `beacon_yaml2md.pl` doc generator contains hard coded definitions to VRS 1.2 `CopyNumber` which doesn't exist in 1.3. This should be fixed separately, possibly w/ revision of the schema documentation method/engine. --- bin/beacon_yaml2md.pl | 4 ++-- bin/deref_schemas/obj/CopyNumber.yaml | 2 +- docs/schemas-md/obj/CopyNumber.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/beacon_yaml2md.pl b/bin/beacon_yaml2md.pl index 1285de4d..9fc75fe5 100755 --- a/bin/beacon_yaml2md.pl +++ b/bin/beacon_yaml2md.pl @@ -729,9 +729,9 @@ sub add_properties_vrs { my ( $property, $data ) = @_; my %url = ( 'SequenceExpression' => -'https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/', +'https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/', 'CopyNumber' => -'https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/' +'https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/' ); if ( exists $url{$property} ) { $data->{properties} = diff --git a/bin/deref_schemas/obj/CopyNumber.yaml b/bin/deref_schemas/obj/CopyNumber.yaml index ec96fa12..37906e03 100644 --- a/bin/deref_schemas/obj/CopyNumber.yaml +++ b/bin/deref_schemas/obj/CopyNumber.yaml @@ -1,4 +1,4 @@ --- CopyNumber: - properties: '[VRS definition for CopyNumber](https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/CopyNumber)' + properties: '[VRS definition for CopyNumber](https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/CopyNumber)' type: allOf diff --git a/docs/schemas-md/obj/CopyNumber.md b/docs/schemas-md/obj/CopyNumber.md index e55d7cca..88e7a5ee 100644 --- a/docs/schemas-md/obj/CopyNumber.md +++ b/docs/schemas-md/obj/CopyNumber.md @@ -1,3 +1,3 @@ |Term | Description | Type | Properties | Example | Enum| | ---| ---| ---| ---| ---| --- | -| CopyNumber | NA | allOf | [VRS definition for CopyNumber](https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/CopyNumber) | NA | NA| +| CopyNumber | NA | allOf | [VRS definition for CopyNumber](https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/CopyNumber) | NA | NA|