From 04f58622de0d01c9dddfe06666f70fef0c0c45fb Mon Sep 17 00:00:00 2001 From: "Alex H. Wagner, PhD" Date: Mon, 9 Sep 2024 11:50:56 -0400 Subject: [PATCH] begin conceptual merge from Issue-14 branch Co-authored-by: DanielPuthawala --- schema/cat-vrs/Makefile | 47 +- schema/cat-vrs/cat-vrs-source.yaml | 430 ------------------ schema/cat-vrs/core/Makefile | 44 ++ schema/cat-vrs/core/cat-vrs-core-source.yaml | 101 ++++ schema/cat-vrs/{ => core}/prune.mk | 0 schema/cat-vrs/profiles/Makefile | 44 ++ .../profiles/cat-vrs-profiles-source.yaml | 213 +++++++++ schema/cat-vrs/profiles/prune.mk | 11 + 8 files changed, 420 insertions(+), 470 deletions(-) delete mode 100644 schema/cat-vrs/cat-vrs-source.yaml create mode 100644 schema/cat-vrs/core/Makefile create mode 100644 schema/cat-vrs/core/cat-vrs-core-source.yaml rename schema/cat-vrs/{ => core}/prune.mk (100%) create mode 100644 schema/cat-vrs/profiles/Makefile create mode 100644 schema/cat-vrs/profiles/cat-vrs-profiles-source.yaml create mode 100644 schema/cat-vrs/profiles/prune.mk diff --git a/schema/cat-vrs/Makefile b/schema/cat-vrs/Makefile index 7575c82..d07897a 100644 --- a/schema/cat-vrs/Makefile +++ b/schema/cat-vrs/Makefile @@ -1,44 +1,11 @@ -.SECONDARY: -.DELETE_ON_ERROR: +all: core profiles -BUILD_DIR := build -DEF_DIR := def -JSON_DIR := json -IMPORT_DIR := import +profiles: + (cd profiles; make all) -vpath %tag $(BUILD_DIR) -vpath %.classes $(BUILD_DIR) - -SOURCES := $(wildcard *-source.yaml) -TAGS := $(SOURCES:-source.yaml=.tag) -IMPORTS := $(wildcard $(IMPORT_DIR)/*-source.yaml) - -all: build-ordered ${TAGS} prune-tag - -build-ordered: | $(BUILD_DIR) - -$(BUILD_DIR): - mkdir $(BUILD_DIR) - -%.tag: %.classes %.json-tag %.defs-tag - touch $(BUILD_DIR)/$@ - -%.classes: %-source.yaml - source2classes $< >${BUILD_DIR}/$@ - -%.json-tag: %-source.yaml ${IMPORTS} - source2splitjs $< - touch $(BUILD_DIR)/$@ - -%.defs-tag: %-source.yaml ${IMPORTS} - y2t $< - touch $(BUILD_DIR)/$@ - -prune-tag: ${TAGS} - $(MAKE) -f prune.mk - touch $(BUILD_DIR)/$@ +core: + (cd core; make all) clean: - rm $(BUILD_DIR)/* - rm $(DEF_DIR)/* - rm $(JSON_DIR)/* + (cd profiles; make clean) + (cd core; make clean) \ No newline at end of file diff --git a/schema/cat-vrs/cat-vrs-source.yaml b/schema/cat-vrs/cat-vrs-source.yaml deleted file mode 100644 index 3ee1535..0000000 --- a/schema/cat-vrs/cat-vrs-source.yaml +++ /dev/null @@ -1,430 +0,0 @@ -$schema: "https://json-schema.org/draft/2020-12/schema" -$id: "https://w3id.org/ga4gh/schema/cat-vrs/1.x/cat-vrs-source.yaml" -title: GA4GH-Cat-VRS-Definitions -type: object -strict: true - -imports: - gks.core-im: ../core-im/core-im-source.yaml - gks.data-types: ../data-types/data-types-source.yaml - vrs: ../vrs/vrs-source.yaml - -$defs: - # Categorical Variation are presented top-down. Everything rolls up to - # CategoricalVariation, which is a polymorphic abstraction of many kinds of - # categorical variation. - - # ============================================================================= - # Top-level Categorical Variation concepts - # ============================================================================= - - CategoricalVariation: - inherits: gks.core-im:DomainEntity - maturity: draft - description: >- - A representation of a categorically-defined domain for variation, in which individual - contextual variation instances may be members of the domain. - oneOf: - - $ref: "#/$defs/CanonicalAllele" - - $ref: "#/$defs/CategoricalCnv" - - $ref: "#/$defs/DescribedVariation" - - $ref: "#/$defs/ProteinSequenceConsequence" - heritableProperties: - members: - type: array - ordered: false - description: >- - A non-exhaustive list of VRS variation contexts that satisfy the constraints of - this categorical variant. - items: - oneOf: - - $ref: "/ga4gh/schema/vrs/2.x/json/Variation" - - $ref: "/ga4gh/schema/gks-common/1.x/json/IRI" - - ProteinSequenceConsequence: - type: object - inherits: CategoricalVariation - maturity: draft - description: >- - A change that occurs in a protein sequence as a result of genomic changes. Due to the degenerate nature - of the genetic code, there are often several genomic changes that can cause a protein sequence consequence. - The protein sequence consequence, like a :ref:`CanonicalAllele`, is defined by an - `Allele ` - that is representative of a collection of congruent Protein Alleles that share the same altered codon(s). - properties: - type: - extends: type - const: ProteinSequenceConsequence - default: ProteinSequenceConsequence - description: 'MUST be "ProteinSequenceConsequence"' - definingContext: - oneOf: - - $ref: "/ga4gh/schema/vrs/2.x/json/Allele" - - $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI" - description: >- - The `Allele `_ - object that is congruent with (projects to the same codons) as alleles on other protein reference - sequences. - required: - - definingContext - - CanonicalAllele: - inherits: CategoricalVariation - maturity: draft - description: >- - A canonical allele is defined by an `Allele `_ - that is representative of a collection of congruent Alleles, each of which depict the same nucleic acid - change on different underlying reference sequences. Congruent representations of an Allele often exist - across different genome assemblies and associated cDNA transcript representations. - type: object - properties: - type: - extends: type - const: CanonicalAllele - default: CanonicalAllele - description: 'MUST be "CanonicalAllele"' - definingContext: - oneOf: - - $ref: "/ga4gh/schema/vrs/2.x/json/Allele" - - $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI" - description: >- - The `Allele `_ - object that is congruent with variants on alternate reference sequences. - required: - - definingContext - - CategoricalCnv: - type: object - inherits: CategoricalVariation - maturity: draft - description: >- - A categorical variation domain is defined first by a sequence derived from a canonical `SequenceLocation - `_ , - which is representative of a collection of congruent Locations. The change or count of this sequence is - also described, either by a numeric value (e.g. "3 or more copies") or categorical representation - (e.g. "high-level gain"). Categorical CNVs may optionally be defined by rules specifying the location - match characteristics for member CNVs. - properties: - type: - extends: type - const: CategoricalCnv - default: CategoricalCnv - description: 'MUST be "CategoricalCnv"' - location: - oneOf: - - $ref: "/ga4gh/schema/vrs/2.x/json/SequenceLocation" - - $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI" - description: >- - A `SequenceLocation `_ - object that represents a sequence derived from that location, and is congruent with locations - on alternate reference sequences. - locationMatchCharacteristic: - type: string - enum: ['exact', 'partial', 'subinterval', 'superinterval'] - description: >- - The characteristics of a valid match between a contextual CNV location (the query) and the - Categorical CNV location (the domain), when both query and domain are represented on the same - reference sequence. An `exact` match requires the location of the query and domain to be identical. - A `subinterval` match requires the query to be a subinterval of the domain. A `superinterval` match - requires the query to be a superinterval of the domain. A `partial` match requires at least 1 residue - of overlap between the query and domain. - copyChange: - type: string - enum: [ "EFO:0030069", "EFO:0020073", "EFO:0030068", "EFO:0030067", "EFO:0030064", "EFO:0030070", "EFO:0030071", "EFO:0030072" ] - description: >- - A representation of the change in copies of a sequence in a system. 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). - copies: - oneOf: - - type: integer - - $ref: "/ga4gh/schema/vrs/2.x/json/Range" - description: >- - The integral number of copies of the subject in a system. - required: - - location - - DescribedVariation: - type: object - inherits: CategoricalVariation - maturity: draft - description: >- - Some categorical variation concepts are supported by custom nomenclatures or text-descriptive - representations for which a categorical variation model does not exist. DescribedVariation is - a class that adds requirements and contextual semantics to the `label` and `description` fields - to indicate how a categorical variation concept should be evaluated for matching variants. - properties: - type: - extends: type - const: DescribedVariation - default: DescribedVariation - description: 'MUST be "DescribedVariation"' - label: - extends: label - description: >- - A primary label for the categorical variation. This required property should provide a - short and descriptive textual representation of the concept. - description: - extends: description - description: >- - A textual description of the domain of variation that should match the categorical - variation entity. - required: - - label - - - # test_parent_A: - # maturity: draft - # heritable properties: - # type: - # type: string - # prop1: - # type: string - # const: "property from the test parent class" - # description: >- - # Must be "property from the test parent class" - # description: >- - # test parent ID. MUST be "test_parent" - # # heritable_required: ["type"] - - # test_child_B: - # inherits: test_parent_A - # # type: object - # description: >- - # Child_B, a child of test_parent_A - # heritable properties: - # prop2: - # type: string - # const: "property from the test_child_B" - # description: >- - # Must be "property from the test_child_B" - - # test_child_C: - # inherits: test_parent_A - # description: >- - # Child_C, a child of test_parent_A - # heritable properties: - # prop3: - # type: string - # const: "property from the test_child_C" - # description: >- - # Must be "property from the test_child_C" - - - # test_grandchild_D: - # inherits: test_child_B, test_child_C - # # inherits: test_child_C - # description: >- - # Child_C, a child of test_child_B and test_child_D - - - - - NumberCount: - # ga4ghDigest: - # keys: - # - numberCount - type: object - # inherits: QuantityVariance - maturity: draft - description: >- - The absolute count of a discrete assayable unit (e.g. chromosome, gene, or sequence). - properties: - type: - type: string - const: "NumberCount" - default: "NumberCount" - description: >- - MUST be "NumberCount" - count: - oneOf: - - type: integer - - $ref: "/ga4gh/schema/vrs/2.x/json/Range" - description: >- - The integral quantity or quantity range of the subject in a system - required: [ "count" ] - - - NumberChange: - # ga4ghDigest: - # keys: - # - numberChange - # prefix: CX - 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: - - type: integer - - $ref: "/ga4gh/schema/vrs/2.x/json/Range" - - copyChange: - type: string - enum: [ "EFO:0030069", "EFO:0020073", "EFO:0030068", "EFO:0030067", "EFO:0030064", "EFO:0030070", - "EFO:0030071", "EFO:0030072" ] - description: >- - a quantitative or qualitative value of the measurement with respect to a baseline (0). - If qualitative, 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" ] - - QuantityVariance: - type: object - # inherits: NumberCount - maturity: draft - description: >- - The Quantity Variance class captures one axis of variation in the generalized model of categorical - variation. It is used to model quantitative measure changes in a given biological level of - variation. - properties: - type: - type: string - const: QuantityVariance - default: QuantityVariance - description: 'MUST be "QuantityVariance"' - # label: - # extends: label - # description: >- - # A primary label for the quantity variant. This required property should provide a - # short and descriptive textual representation of the concept. - # description: - # extends: description - # description: >- - # A textual description of the domain of variation that should match the categorical - # variation entity. - # locationMatchCharacteristic: - # type: string - # enum: ['exact', 'partial', 'subinterval', 'superinterval'] - # description: >- - # The characteristics of a valid match between a contextual CNV location (the query) and the - # Categorical CNV location (the domain), when both query and domain are represented on the same - # reference sequence. An `exact` match requires the location of the query and domain to be identical. - # A `subinterval` match requires the query to be a subinterval of the domain. A `superinterval` match - # requires the query to be a superinterval of the domain. A `partial` match requires at least 1 residue - # of overlap between the query and domain. - # copyChange: - # type: string - # enum: [ "EFO:0030069", "EFO:0020073", "EFO:0030068", "EFO:0030067", "EFO:0030064", "EFO:0030070", "EFO:0030071", "EFO:0030072" ] - # description: >- - # A representation of the change in copies of a sequence in a system. 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). - # copies: - # oneOf: - # - type: integer - # - $ref: "/ga4gh/schema/vrs/2.x/json/Range" - # description: >- - # The integral number of copies of the subject in a system. - # required: - # - label - - # # Categorical Variation is presented top-down. Everything rolls up to - # # CategoricalVariant, is composed of one or several level variants, - # # each of which is in turn associated with a biological level of - # # variation, and relevant properties to intensionally define set - # # membership. - - # ============================================================================= - # Top-level Categorical Variation concepts - # ============================================================================= - - CategoricalVariant: - inherits: gks.core-im:DomainEntity - maturity: draft - description: >- - A top-level representation of a categorically-defined domain for variation across one or multiple biological levels in which individual contextual variants may be members of the domain. - # type: object - # properties: - # id: - # type: string - # description: >- - # The 'logical' identifier of the entity in the system of record, e.g. a UUID. This 'id' is - # unique within a given system. The identified entity may have a different 'id' in a different - # system, or may refer to an 'id' for the shared concept in another system (e.g. a CURIE). - # label: - # type: string - # description: A primary label for the entity. - # description: - # type: string - # description: A free-text description of the entity. - # extensions: - # type: array - # ordered: true - # items: - # - $refExtension: gks.core-im:Extension - - - - - - -# CanonicalLocation: -# inherits: Constraint -# type: object -# properties: -# type: -# type: string -# const: "CanonicalLocation" -# definingContext: -# type: -# $refCurie: vrs:Location -# description: >- -# The `VRS Location `_ -# object describing the location range for the categorical variant. -# matchCharacteristic: -# type: string -# enum: -# - exact -# - partial -# - complete - - - # GeneContext: - # inherits: Constraint - # type: object - # properties: - # type: - # type: string - # const: "GeneContext" - # definingGene: - # description: >- - # The gene context for which variants must be evaluated. - - - # ComplexVariation: - # type: object - # inherits: CategoricalVariation - # description: >- - # A categorical variation domain jointly characterized by two or more other categorical - # variation domains. - # properties: - # type: - # type: string - # description: MUST be "ComplexVariation". - # const: ComplexVariation - # operands: - # type: array - # ordered: false - # items: - # $ref: "#/$defs/CategoricalVariation" - # minItems: 2 - # description: >- - # The :ref:`CategoricalVariation` objects that are being evaluated collectively. - # operator: - # type: string - # enum: ["AND", "OR"] - # description: >- - # The logical operation applied to evaluating the object *operands*. MUST - # be "AND" or "OR". - # required: ["operands", "operator"] diff --git a/schema/cat-vrs/core/Makefile b/schema/cat-vrs/core/Makefile new file mode 100644 index 0000000..7575c82 --- /dev/null +++ b/schema/cat-vrs/core/Makefile @@ -0,0 +1,44 @@ +.SECONDARY: +.DELETE_ON_ERROR: + +BUILD_DIR := build +DEF_DIR := def +JSON_DIR := json +IMPORT_DIR := import + +vpath %tag $(BUILD_DIR) +vpath %.classes $(BUILD_DIR) + +SOURCES := $(wildcard *-source.yaml) +TAGS := $(SOURCES:-source.yaml=.tag) +IMPORTS := $(wildcard $(IMPORT_DIR)/*-source.yaml) + +all: build-ordered ${TAGS} prune-tag + +build-ordered: | $(BUILD_DIR) + +$(BUILD_DIR): + mkdir $(BUILD_DIR) + +%.tag: %.classes %.json-tag %.defs-tag + touch $(BUILD_DIR)/$@ + +%.classes: %-source.yaml + source2classes $< >${BUILD_DIR}/$@ + +%.json-tag: %-source.yaml ${IMPORTS} + source2splitjs $< + touch $(BUILD_DIR)/$@ + +%.defs-tag: %-source.yaml ${IMPORTS} + y2t $< + touch $(BUILD_DIR)/$@ + +prune-tag: ${TAGS} + $(MAKE) -f prune.mk + touch $(BUILD_DIR)/$@ + +clean: + rm $(BUILD_DIR)/* + rm $(DEF_DIR)/* + rm $(JSON_DIR)/* diff --git a/schema/cat-vrs/core/cat-vrs-core-source.yaml b/schema/cat-vrs/core/cat-vrs-core-source.yaml new file mode 100644 index 0000000..f4974f2 --- /dev/null +++ b/schema/cat-vrs/core/cat-vrs-core-source.yaml @@ -0,0 +1,101 @@ +$schema: "https://json-schema.org/draft/2020-12/schema" +$id: "https://w3id.org/ga4gh/schema/cat-vrs/1.x/cat-vrs-core-source.yaml" +title: GA4GH-Cat-VRS-Definitions +type: object +strict: true + +imports: + gks.core-im: ../../core-im/core-im-source.yaml + gks.data-types: ../../data-types/data-types-source.yaml + vrs: ../../vrs/vrs-source.yaml + +$defs: + + # ============================================================================= + # Top-level Categorical Variant concept + # ============================================================================= + + CategoricalVariant: + inherits: gks.core-im:DomainEntity + maturity: draft + description: >- + A representation of a categorically-defined domain for variation, in which individual + contextual variation instances may be members of the domain. + properties: + type: + extends: type + const: CategoricalVariant + default: CategoricalVariant + description: 'MUST be "CategoricalVariant"' + members: + type: array + ordered: false + description: >- + A non-exhaustive list of VRS variation contexts that satisfy the constraints of + this categorical variant. + items: + oneOf: + - $ref: "/ga4gh/schema/vrs/2.x/json/Variation" + - $ref: "/ga4gh/schema/gks-common/1.x/json/IRI" + constraints: + type: array + ordered: false + items: + $ref: "#/$defs/Constraint" + minItems: 1 + required: + - constraints + + # ============================================================================= + # Constraint Definitions + # ============================================================================= + + Constraint: + maturity: draft + inherits: gks.core-im:DomainEntity + description: >- + Constraints are used to construct an intensional semantics of categorical variant types. + oneOf: + - $ref: "#/$defs/DefiningContextConstraint" + heritableProperties: + description: + extends: description + description: >- + A textual description of the domain of variation that should match the categorical + variation entity. + label: + extends: label + description: >- + A primary label for the categorical variation. This required property should provide a + short and descriptive textual representation of the concept. + + DefiningContextConstraint: + maturity: draft + inherits: Constraint + description: + The location or location-state, congruent with other reference sequences, about which categorical variation is being described. + properties: + type: + extends: type + const: DefiningContextConstriant + default: DefiningContextConstriant + description: 'MUST be "DefiningContextConstriant"' + definingContext: + oneOf: + - $refCurie: vrs:Location + - $refCurie: vrs:Allele + relations: + type: array + items: + enum: + - sequence_liftover + - transcript_projection + - codon_translation + description: >- + Defined relationshis between members of the categorical variant and the defining context. + ``sequence_liftover`` refers to variants or locations that represent a congruent concept on a differing assembly of a + human genome (e.g. "GRCh37" and "GRCh38") or gene (e.g. Locus Reference Genomic) sequence. ``transcript_projection`` + refers to variants or locations that occur on transcripts projected from the defined genomic concept. ``codon_translation`` + refers to variants or locations that translate from the codon(s) represented by the defined concept. + required: + - definingContext \ No newline at end of file diff --git a/schema/cat-vrs/prune.mk b/schema/cat-vrs/core/prune.mk similarity index 100% rename from schema/cat-vrs/prune.mk rename to schema/cat-vrs/core/prune.mk diff --git a/schema/cat-vrs/profiles/Makefile b/schema/cat-vrs/profiles/Makefile new file mode 100644 index 0000000..7575c82 --- /dev/null +++ b/schema/cat-vrs/profiles/Makefile @@ -0,0 +1,44 @@ +.SECONDARY: +.DELETE_ON_ERROR: + +BUILD_DIR := build +DEF_DIR := def +JSON_DIR := json +IMPORT_DIR := import + +vpath %tag $(BUILD_DIR) +vpath %.classes $(BUILD_DIR) + +SOURCES := $(wildcard *-source.yaml) +TAGS := $(SOURCES:-source.yaml=.tag) +IMPORTS := $(wildcard $(IMPORT_DIR)/*-source.yaml) + +all: build-ordered ${TAGS} prune-tag + +build-ordered: | $(BUILD_DIR) + +$(BUILD_DIR): + mkdir $(BUILD_DIR) + +%.tag: %.classes %.json-tag %.defs-tag + touch $(BUILD_DIR)/$@ + +%.classes: %-source.yaml + source2classes $< >${BUILD_DIR}/$@ + +%.json-tag: %-source.yaml ${IMPORTS} + source2splitjs $< + touch $(BUILD_DIR)/$@ + +%.defs-tag: %-source.yaml ${IMPORTS} + y2t $< + touch $(BUILD_DIR)/$@ + +prune-tag: ${TAGS} + $(MAKE) -f prune.mk + touch $(BUILD_DIR)/$@ + +clean: + rm $(BUILD_DIR)/* + rm $(DEF_DIR)/* + rm $(JSON_DIR)/* diff --git a/schema/cat-vrs/profiles/cat-vrs-profiles-source.yaml b/schema/cat-vrs/profiles/cat-vrs-profiles-source.yaml new file mode 100644 index 0000000..8b3b192 --- /dev/null +++ b/schema/cat-vrs/profiles/cat-vrs-profiles-source.yaml @@ -0,0 +1,213 @@ +$schema: "https://json-schema.org/draft/2020-12/schema" +$id: "https://w3id.org/ga4gh/schema/cat-vrs/1.x/profiles/cat-vrs-profiles-source.yaml" +title: GA4GH-Cat-VRS-Definitions +type: object +strict: true + +imports: + gks.core-im: ../../core-im/core-im-source.yaml + gks.data-types: ../../data-types/data-types-source.yaml + vrs: ../../vrs/vrs-source.yaml + cat.core: ../core/cat-vrs-core-source.yaml + +$defs: + ProteinSequenceConsequenceProperties: + properties: + constraints: + contains: + allOf: + - $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/DefiningContextConstraint" + - type: object + properties: + relations: + contains: + const: codon_translation + + ProteinSequenceConsequence: + type: object + maturity: draft + description: >- + A change that occurs in a protein sequence as a result of genomic changes. Due to the degenerate nature + of the genetic code, there are often several genomic changes that can cause a protein sequence consequence. + The protein sequence consequence, like a :ref:`CanonicalAllele`, is defined by an + `Allele ` + that is representative of a collection of congruent Protein Alleles that share the same altered codon(s). + allOf: + - $ref: "#/$defs/ProteinSequenceConsequenceProperties" + - $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/CategoricalVariation" + + CanonicalAlleleProperties: + properties: + constraints: + contains: + allOf: + - $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/DefiningContextConstraint" + - type: object + properties: + relations: + allOf: + - contains: + const: sequence_liftover + - contains: + const: transcript_projection + + CanonicalAllele: + maturity: draft + description: >- + A canonical allele is defined by an `Allele `_ + that is representative of a collection of congruent Alleles, each of which depict the same nucleic acid + change on different underlying reference sequences. Congruent representations of an Allele often exist + across different genome assemblies and associated cDNA transcript representations. + type: object + allOf: + - $ref: "#/$defs/CanonicalAlleleProperties" + - $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/CategoricalVariation" + + + # CategoricalCnv: + # type: object + # inherits: CategoricalVariation + # maturity: draft + # description: >- + # A categorical variation domain is defined first by a sequence derived from a canonical `SequenceLocation + # `_ , + # which is representative of a collection of congruent Locations. The change or count of this sequence is + # also described, either by a numeric value (e.g. "3 or more copies") or categorical representation + # (e.g. "high-level gain"). Categorical CNVs may optionally be defined by rules specifying the location + # match characteristics for member CNVs. + # properties: + # type: + # extends: type + # const: CategoricalCnv + # default: CategoricalCnv + # description: 'MUST be "CategoricalCnv"' + # location: + # oneOf: + # - $ref: "/ga4gh/schema/vrs/2.x/json/SequenceLocation" + # - $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI" + # description: >- + # A `SequenceLocation `_ + # object that represents a sequence derived from that location, and is congruent with locations + # on alternate reference sequences. + # locationMatchCharacteristic: + # type: string + # enum: ['exact', 'partial', 'subinterval', 'superinterval'] + # description: >- + # The characteristics of a valid match between a contextual CNV location (the query) and the + # Categorical CNV location (the domain), when both query and domain are represented on the same + # reference sequence. An `exact` match requires the location of the query and domain to be identical. + # A `subinterval` match requires the query to be a subinterval of the domain. A `superinterval` match + # requires the query to be a superinterval of the domain. A `partial` match requires at least 1 residue + # of overlap between the query and domain. + # copyChange: + # type: string + # enum: [ "EFO:0030069", "EFO:0020073", "EFO:0030068", "EFO:0030067", "EFO:0030064", "EFO:0030070", "EFO:0030071", "EFO:0030072" ] + # description: >- + # A representation of the change in copies of a sequence in a system. 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). + # copies: + # oneOf: + # - type: integer + # - $ref: "/ga4gh/schema/vrs/2.x/json/Range" + # description: >- + # The integral number of copies of the subject in a system. + # required: + # - location + + # DescribedVariation: + # type: object + # inherits: CategoricalVariation + # maturity: draft + # description: >- + # Some categorical variation concepts are supported by custom nomenclatures or text-descriptive + # representations for which a categorical variation model does not exist. DescribedVariation is + # a class that adds requirements and contextual semantics to the `label` and `description` fields + # to indicate how a categorical variation concept should be evaluated for matching variants. + # properties: + # type: + # extends: type + # const: DescribedVariation + # default: DescribedVariation + # description: 'MUST be "DescribedVariation"' + # label: + # extends: label + # description: >- + # A primary label for the categorical variation. This required property should provide a + # short and descriptive textual representation of the concept. + # description: + # extends: description + # description: >- + # A textual description of the domain of variation that should match the categorical + # variation entity. + # required: + # - label + # NumberCount: + # # ga4ghDigest: + # # keys: + # # - numberCount + # type: object + # # inherits: QuantityVariance + # maturity: draft + # description: >- + # The absolute count of a discrete assayable unit (e.g. chromosome, gene, or sequence). + # properties: + # type: + # type: string + # const: "NumberCount" + # default: "NumberCount" + # description: >- + # MUST be "NumberCount" + # count: + # oneOf: + # - type: integer + # - $ref: "/ga4gh/schema/vrs/2.x/json/Range" + # description: >- + # The integral quantity or quantity range of the subject in a system + # required: [ "count" ] + # NumberChange: + # # ga4ghDigest: + # # keys: + # # - numberChange + # # prefix: CX + # 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: + # - type: integer + # - $ref: "/ga4gh/schema/vrs/2.x/json/Range" + # - copyChange: + # type: string + # enum: [ "EFO:0030069", "EFO:0020073", "EFO:0030068", "EFO:0030067", "EFO:0030064", "EFO:0030070", + # "EFO:0030071", "EFO:0030072" ] + # description: >- + # a quantitative or qualitative value of the measurement with respect to a baseline (0). + # If qualitative, 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" ] + # QuantityVariance: + type: object + # inherits: NumberCount + maturity: draft + description: >- + The Quantity Variance class captures one axis of variation in the generalized model of categorical + variation. It is used to model quantitative measure changes in a given biological level of + variation. + properties: + type: + type: string + const: QuantityVariance + default: QuantityVariance + description: 'MUST be "QuantityVariance"' \ No newline at end of file diff --git a/schema/cat-vrs/profiles/prune.mk b/schema/cat-vrs/profiles/prune.mk new file mode 100644 index 0000000..5d52ce5 --- /dev/null +++ b/schema/cat-vrs/profiles/prune.mk @@ -0,0 +1,11 @@ +BUILD_DIR := build +SOURCES := $(wildcard *-source.yaml) +CLASS_FILTER_FILES = $(SOURCES:%-source.yaml=${BUILD_DIR}/%.classes) +FILTER_CLASSES := $(shell cat ${CLASS_FILTER_FILES}) +FILTER_JSONS = $(FILTER_CLASSES:%=json/%) +FILTER_DEFS = $(FILTER_CLASSES:%=def/%.rst) + +.DEFAULT: prune + +prune: $(filter-out ${FILTER_JSONS} ${FILTER_DEFS},$(wildcard def/* json/*)) + $(if $^,rm $^) \ No newline at end of file