From f87c7021e841fb56c07c6803df693877754a51b8 Mon Sep 17 00:00:00 2001 From: DanielPuthawala Date: Wed, 27 Mar 2024 12:37:11 -0400 Subject: [PATCH] added copyChange class --- schema/catvrs/catvrs-source.yaml | 40 ++++++++++++++++++++++---- schema/catvrs/def/NumberChange.rst | 24 ++++++++++++++++ schema/catvrs/def/NumberCount.rst | 2 +- schema/catvrs/json/NumberChange | 46 ++++++++++++++++++++++++++++++ schema/catvrs/json/NumberCount | 9 ++---- 5 files changed, 108 insertions(+), 13 deletions(-) create mode 100644 schema/catvrs/def/NumberChange.rst create mode 100644 schema/catvrs/json/NumberChange diff --git a/schema/catvrs/catvrs-source.yaml b/schema/catvrs/catvrs-source.yaml index 34d1c5c..1e8ca8a 100644 --- a/schema/catvrs/catvrs-source.yaml +++ b/schema/catvrs/catvrs-source.yaml @@ -227,9 +227,9 @@ $defs: NumberCount: maturity: draft - ga4ghDigest: - keys: - - copies + # ga4ghDigest: + # keys: + # - numberCount type: object description: >- The absolute count of a discrete assayable unit (e.g. chromosome, gene, or sequence). @@ -240,15 +240,45 @@ $defs: default: "NumberCount" description: >- MUST be "NumberCount" - copies: + count: oneOf: - type: integer - $refCurie: vrs:Range description: >- The integral quantity of the subject in a system - required: [ "copies" ] + required: [ "count" ] + NumberChange: + maturity: draft + # ga4ghDigest: + # keys: + # - numberChange + # prefix: CX + type: object + description: >- + A quantitative assessment of a unit within a system (e.g. genome, cell, + etc.) relative to a baseline quantity. + properties: + type: + type: string + const: "NumberChange" + default: "NumberChange" + description: >- + MUST be "NumberChange" + change: + oneOf: + - type: integer + - $refCurie: vrs:Range + - copyChange: + type: string + enum: [ "efo:0030069", "efo:0020073", "efo:0030068", "efo:0030067", "efo:0030064", "efo:0030070", + "efo:0030071", "efo:0030072" ] + description: >- + MUST be one of "efo:0030069" (complete genomic loss), "efo:0020073" (high-level loss), + "efo:0030068" (low-level loss), "efo:0030067" (loss), "efo:0030064" (regional base ploidy), + "efo:0030070" (gain), "efo:0030071" (low-level gain), "efo:0030072" (high-level gain). + required: [ "change" ] diff --git a/schema/catvrs/def/NumberChange.rst b/schema/catvrs/def/NumberChange.rst new file mode 100644 index 0000000..3d71e64 --- /dev/null +++ b/schema/catvrs/def/NumberChange.rst @@ -0,0 +1,24 @@ +**Computational Definition** + +A quantitative assessment of a unit within a system (e.g. genome, cell, etc.) relative to a baseline quantity. + + **Information Model** + + .. list-table:: + :class: clean-wrap + :header-rows: 1 + :align: left + :widths: auto + + * - Field + - Type + - Limits + - Description + * - type + - string + - 0..1 + - MUST be "NumberChange" + * - change + - integer | `Range <../vrs/vrs.yaml#/$defs/Range>`_ | string + - 0..1 + - diff --git a/schema/catvrs/def/NumberCount.rst b/schema/catvrs/def/NumberCount.rst index 92ca093..79603f3 100644 --- a/schema/catvrs/def/NumberCount.rst +++ b/schema/catvrs/def/NumberCount.rst @@ -18,7 +18,7 @@ The absolute count of a discrete assayable unit (e.g. chromosome, gene, or seque - string - 0..1 - MUST be "NumberCount" - * - copies + * - count - integer | `Range <../vrs/vrs.yaml#/$defs/Range>`_ - 1..1 - The integral quantity of the subject in a system diff --git a/schema/catvrs/json/NumberChange b/schema/catvrs/json/NumberChange new file mode 100644 index 0000000..acea254 --- /dev/null +++ b/schema/catvrs/json/NumberChange @@ -0,0 +1,46 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://w3id.org/ga4gh/schema/catvrs/1.x/json/NumberChange", + "title": "NumberChange", + "type": "object", + "maturity": "draft", + "description": "A quantitative assessment of a unit within a system (e.g. genome, cell, etc.) relative to a baseline quantity.", + "properties": { + "type": { + "type": "string", + "const": "NumberChange", + "default": "NumberChange", + "description": "MUST be \"NumberChange\"" + }, + "change": { + "oneOf": [ + { + "$ref": "/ga4gh/schema/vrs/2.x/json/Range" + }, + { + "type": "integer" + }, + { + "copyChange": null, + "type": "string", + "enum": [ + "efo:0030069", + "efo:0020073", + "efo:0030068", + "efo:0030067", + "efo:0030064", + "efo:0030070", + "efo:0030071", + "efo:0030072" + ], + "description": "MUST be one of \"efo:0030069\" (complete genomic loss), \"efo:0020073\" (high-level loss), \"efo:0030068\" (low-level loss), \"efo:0030067\" (loss), \"efo:0030064\" (regional base ploidy), \"efo:0030070\" (gain), \"efo:0030071\" (low-level gain), \"efo:0030072\" (high-level gain)." + } + ], + "required": [ + "change" + ] + } + }, + "required": [], + "additionalProperties": false +} \ No newline at end of file diff --git a/schema/catvrs/json/NumberCount b/schema/catvrs/json/NumberCount index f3bd469..51d6d80 100644 --- a/schema/catvrs/json/NumberCount +++ b/schema/catvrs/json/NumberCount @@ -4,11 +4,6 @@ "title": "NumberCount", "type": "object", "maturity": "draft", - "ga4ghDigest": { - "keys": [ - "copies" - ] - }, "description": "The absolute count of a discrete assayable unit (e.g. chromosome, gene, or sequence).", "properties": { "type": { @@ -17,7 +12,7 @@ "default": "NumberCount", "description": "MUST be \"NumberCount\"" }, - "copies": { + "count": { "oneOf": [ { "$ref": "/ga4gh/schema/vrs/2.x/json/Range" @@ -30,7 +25,7 @@ } }, "required": [ - "copies" + "count" ], "additionalProperties": false } \ No newline at end of file