diff --git a/.gitmodules b/.gitmodules index 416af4a..d56ef35 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "submodules/vrs"] path = submodules/vrs url = https://github.com/ga4gh/vrs.git - branch = 2.0-alpha + branch = 2.x diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b2c2e1e --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +PYV:=3.12 +VEDIR=venv/${PYV} + +############################################################################ +#= SETUP, INSTALLATION, PACKAGING + +#=> venv: make a Python 3 virtual environment +.PHONY: venv/% +venv/%: + python$* -m venv $@; \ + source $@/bin/activate; \ + python -m ensurepip --upgrade; \ + pip install --upgrade pip setuptools + +#=> develop: install package in develop mode +.PHONY: develop setup +develop setup: + pip install -r .requirements.txt + +#=> devready: create venv, install prerequisites, install pkg in develop mode +.PHONY: devready +devready: + make ${VEDIR} && source ${VEDIR}/bin/activate && make develop + @echo '#################################################################################' + @echo '### Do not forget to `source ${VEDIR}/bin/activate` to use this environment ###' + @echo '#################################################################################' + +############################################################################ +#= TESTING +# see test configuration in pyproject.toml + +#=> test: execute tests +.PHONY: test +test: + pytest tests/ + +#=> doctest: execute documentation tests (requires extra data) +.PHONY: doctest +doctest: + pytest tests/ --doctest-modules diff --git a/docs/source/appendices/index.rst b/docs/source/appendices/index.rst index 3a0e368..f19176b 100644 --- a/docs/source/appendices/index.rst +++ b/docs/source/appendices/index.rst @@ -2,47 +2,16 @@ Appendices !!!!!!!!!! -blah +.. TODO:: Either add general landing page material for all appendices here or include the content of the different subsections directly. .. toctree:: :maxdepth: 2 design_decisions - development_process - future_plans - - implementations - relationships - associating_annotations - equivalence - ga4gh_identifiers - truncated_digest_collision_analysis - faq glossary -.. .. toctree:: - :maxdepth: 2 - design_decisions - glossary - relationships - faq - - - - -.. truncated_digest_collision_analysis -.. future_plans -.. implementations - equivalence - associating_annotations - ga4gh_identifiers - development_process - - - - diff --git a/docs/source/def b/docs/source/def new file mode 120000 index 0000000..75475c0 --- /dev/null +++ b/docs/source/def @@ -0,0 +1 @@ +../../schema/catvrs/def \ No newline at end of file diff --git a/docs/source/defs b/docs/source/defs deleted file mode 120000 index ec08416..0000000 --- a/docs/source/defs +++ /dev/null @@ -1 +0,0 @@ -../../schema/defs/catvrs/ \ No newline at end of file diff --git a/docs/source/releases/1.0.rst b/docs/source/releases/index.rst similarity index 76% rename from docs/source/releases/1.0.rst rename to docs/source/releases/index.rst index 975a627..e3c47a6 100644 --- a/docs/source/releases/1.0.rst +++ b/docs/source/releases/index.rst @@ -1,5 +1,7 @@ -1.0 -!!! +.. `Releases`: + +1.0 (pre-releases) +!!!!!!!!!!!!!!!!!! 1.0.0.04-2024.connect @@@@@@@@@@@@@@@@@@@@@ diff --git a/docs/source/rst_epilog b/docs/source/rst_epilog index 6a9039d..d437bdc 100644 --- a/docs/source/rst_epilog +++ b/docs/source/rst_epilog @@ -10,6 +10,8 @@ .. _VRS Gene: https://vrs.ga4gh.org/en/latest/terms_and_model.html#gene .. |vrs| replace:: `VRS `__ +.. |vrs_yaml| replace:: `VRS YAML `__ +.. |vrs_json| replace:: `VRS JSON `__ .. |eg| replace:: *e.g.,* .. |ie| replace:: *i.e.,* \ No newline at end of file diff --git a/docs/source/schema.rst b/docs/source/schema.rst index 3a2605a..1a3f078 100644 --- a/docs/source/schema.rst +++ b/docs/source/schema.rst @@ -13,14 +13,14 @@ Machine Readable Specifications The machine readable Cat-VRS is written using `JSON Schema `_. -The schema itself is written in YAML (|vrs_yaml|) and converted to JSON -(|vrs_json|). +The schema itself is written in YAML (|vrs_yaml|) and converted to individual +JSON files for each class in the schema (|vrs_json|). Contributions to the schema MUST be written in the YAML document. .. _CategoricalVariationSchemata: - +.. _CategoricalVariation: Categorical Variation Schemata @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ -33,32 +33,32 @@ PLEASE CHECK BACK IN THE FUTURE! :alt: An irresistably cute kittynaut beckoning you to enter the Cat-VRS. :align: center -.. include:: defs/CategoricalVariation.rst +.. include:: def/CategoricalVariation.rst -.. _Canonical: +.. _CanonicalAllele: Canonical Allele ################ -.. include:: defs/CanonicalAllele.rst +.. include:: def/CanonicalAllele.rst -.. _Described: +.. _DescribedVariation: Described Variation ################### -.. include:: defs/DescribedVariation.rst +.. include:: def/DescribedVariation.rst -.. _CatCNV: +.. _CategoricalCnv: Categorical Copy Number ####################### -.. include:: defs/CategoricalCnv.rst +.. include:: def/CategoricalCnv.rst -.. _ProtConsequence: +.. _ProteinSequenceConsequence: Protein Sequence Consequence ############################ -.. include:: defs/ProteinSequenceConsequence.rst +.. include:: def/ProteinSequenceConsequence.rst diff --git a/examples/proteinSequenceConsequence-ex1.yaml b/examples/proteinSequenceConsequence-ex1.yaml index 4c9c177..534fb2f 100644 --- a/examples/proteinSequenceConsequence-ex1.yaml +++ b/examples/proteinSequenceConsequence-ex1.yaml @@ -1,13 +1,13 @@ id: civic.mpid:33 type: ProteinSequenceConsequence description: >- - EGFR L858R has long been recognized as a functionally significant mutation in cancer, - and is one of the most prevalent single mutations in lung cancer. Best described in - non-small cell lung cancer (NSCLC), the mutation seems to confer sensitivity to first - and second generation TKI's like gefitinib and neratinib. NSCLC patients with this - mutation treated with TKI's show increased overall and progression-free survival, as - compared to chemotherapy alone. Third generation TKI's are currently in clinical trials - that specifically focus on mutant forms of EGFR, a few of which have shown efficacy in + EGFR L858R has long been recognized as a functionally significant mutation in cancer, + and is one of the most prevalent single mutations in lung cancer. Best described in + non-small cell lung cancer (NSCLC), the mutation seems to confer sensitivity to first + and second generation TKI's like gefitinib and neratinib. NSCLC patients with this + mutation treated with TKI's show increased overall and progression-free survival, as + compared to chemotherapy alone. Third generation TKI's are currently in clinical trials + that specifically focus on mutant forms of EGFR, a few of which have shown efficacy in treating patients that failed to respond to earlier generation TKI therapies. label: EGFR L858R definingContext: vrs.json#/ga4gh:VA.kgjrhgf84CEndyLjKdAO0RxN-e3pJjxA @@ -16,7 +16,7 @@ members: - vrs.json#/ga4gh:VA.3_FsKSUHEdurPIw5gqpw6g0_Ga0TEXQh - vrs.json#/ga4gh:VA.zpv3dW34z8jioKL-NtbGc0fa9clsgAZT - vrs.json#/ga4gh:VA.BJOtfUhZMooMJUO4FjxHXTEimrKXtF0i -aliases: +alternativeLabels: - LEU858ARG - rs121434568 mappings: diff --git a/schema/catvrs/Makefile b/schema/catvrs/Makefile index 30a68ba..1645099 100644 --- a/schema/catvrs/Makefile +++ b/schema/catvrs/Makefile @@ -2,6 +2,8 @@ .DELETE_ON_ERROR: BUILD_DIR := build +DEF_DIR := def +JSON_DIR := json IMPORT_DIR := import vpath %tag $(BUILD_DIR) @@ -38,3 +40,5 @@ prune-tag: ${TAGS} clean: rm $(BUILD_DIR)/* + rm $(DEF_DIR)/* + rm $(JSON_DIR)/* diff --git a/schema/catvrs/catvrs-source.yaml b/schema/catvrs/catvrs-source.yaml index 718777c..b07aa03 100644 --- a/schema/catvrs/catvrs-source.yaml +++ b/schema/catvrs/catvrs-source.yaml @@ -5,15 +5,15 @@ type: object strict: true imports: - gks.core: ../gks-common/core-source.yaml + gks.common: ../gks-common/common-source.yaml vrs: ../vrs/vrs-source.yaml namespaces: vrs: ../vrs/vrs.yaml#/$defs/ - gks.core: ../gks-common/core.yaml#/$defs/ + gks.common: ../gks-common/common.yaml#/$defs/ $defs: - # VRSATILE Categorical Variation are presented top-down. Everything rolls up to + # Categorical Variation are presented top-down. Everything rolls up to # CategoricalVariation, which is a polymorphic abstraction of many kinds of # categorical variation. @@ -22,7 +22,7 @@ $defs: # ============================================================================= CategoricalVariation: - inherits: gks.core:DomainEntity + inherits: gks.common:DomainEntity description: >- A representation of a categorically-defined domain for variation, in which individual contextual variation instances may be members of the domain. @@ -41,7 +41,7 @@ $defs: items: oneOf: - $refCurie: vrs:Variation - - $refCurie: gks.core:IRI + - $refCurie: gks.common:IRI constraints: type: array ordered: false @@ -60,14 +60,14 @@ $defs: of congruent Protein Alleles that share the same altered codon(s). properties: type: - type: string + extends: type const: ProteinSequenceConsequence default: ProteinSequenceConsequence description: 'MUST be "ProteinSequenceConsequence"' definingContext: oneOf: - $refCurie: vrs:Allele - - $refCurie: gks.core:IRI + - $refCurie: gks.common:IRI description: >- The `VRS Allele `_ object that is congruent with (projects to the same codons) as alleles on other protein reference @@ -86,14 +86,14 @@ $defs: type: object properties: type: - type: string + extends: type const: CanonicalAllele default: CanonicalAllele description: 'MUST be "CanonicalAllele"' definingContext: oneOf: - $refCurie: vrs:Allele - - $refCurie: gks.core:IRI + - $refCurie: gks.common:IRI description: >- The `VRS Allele `_ object that is congruent with variants on alternate reference sequences. @@ -113,7 +113,7 @@ $defs: member CNVs. properties: type: - type: string + extends: type const: CategoricalCnv default: CategoricalCnv description: 'MUST be "CategoricalCnv"' @@ -162,7 +162,7 @@ $defs: to indicate how a categorical variation concept should be evaluated for matching variants. properties: type: - type: string + extends: type const: DescribedVariation default: DescribedVariation description: 'MUST be "DescribedVariation"' @@ -460,10 +460,10 @@ $defs: # Top-level Categorical Variation concepts # ============================================================================= - # CategoricalVariant: - # inherits: gks.core:DomainEntity - # 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. + CategoricalVariant: + inherits: gks.common:DomainEntity + 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: @@ -482,7 +482,7 @@ $defs: # type: array # ordered: true # items: - # - $refExtension: gks.core:Extension + # - $refExtension: gks.common:Extension diff --git a/schema/catvrs/def/CanonicalAllele.rst b/schema/catvrs/def/CanonicalAllele.rst index 0256667..12158e4 100644 --- a/schema/catvrs/def/CanonicalAllele.rst +++ b/schema/catvrs/def/CanonicalAllele.rst @@ -19,40 +19,40 @@ Some CanonicalAllele attributes are inherited from :ref:`CategoricalVariation`. * - id - string - 0..1 - - 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). + - 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 - string - 0..1 - - A primary label for the entity. + - A primary name for the entity. * - description - string - 0..1 - A free-text description of the entity. + * - alternativeLabels + - string + - 0..m + - Alternative name(s) for the Entity. * - extensions - - `Extension <../gks-common/core.json#/$defs/Extension>`_ + - `Extension <../gks-common/common.json#/$defs/Extension>`_ - 0..m - - + - A list of extensions to the entity. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems. * - mappings - - `Mapping <../gks-common/core.json#/$defs/Mapping>`_ + - `ConceptMapping <../gks-common/common.json#/$defs/ConceptMapping>`_ - 0..m - - + - A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation. + * - members + - `Variation <../vrs/vrs.yaml#/$defs/Variation>`_ | `IRI <../gks-common/common.yaml#/$defs/IRI>`_ + - 0..m + - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. * - type - string - 1..1 - MUST be "CanonicalAllele" - * - aliases - - string - - 0..m - - Aliases are alternate labels for a Domain Entity. - * - members - - `Variation <../vrs/vrs.yaml#/$defs/Variation>`_ | `IRI <../gks-common/core.yaml#/$defs/IRI>`_ - - 0..m - - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. * - constraints - :ref:`Constraint` - 0..m - * - definingContext - - `Allele <../vrs/vrs.yaml#/$defs/Allele>`_ | `IRI <../gks-common/core.yaml#/$defs/IRI>`_ + - `Allele <../vrs/vrs.yaml#/$defs/Allele>`_ | `IRI <../gks-common/common.yaml#/$defs/IRI>`_ - 1..1 - The `VRS Allele `_ object that is congruent with variants on alternate reference sequences. diff --git a/schema/catvrs/def/CategoricalCnv.rst b/schema/catvrs/def/CategoricalCnv.rst index f281eea..c20a557 100644 --- a/schema/catvrs/def/CategoricalCnv.rst +++ b/schema/catvrs/def/CategoricalCnv.rst @@ -19,35 +19,35 @@ Some CategoricalCnv attributes are inherited from :ref:`CategoricalVariation`. * - id - string - 0..1 - - 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). + - 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 - string - 0..1 - - A primary label for the entity. + - A primary name for the entity. * - description - string - 0..1 - A free-text description of the entity. + * - alternativeLabels + - string + - 0..m + - Alternative name(s) for the Entity. * - extensions - - `Extension <../gks-common/core.json#/$defs/Extension>`_ + - `Extension <../gks-common/common.json#/$defs/Extension>`_ - 0..m - - + - A list of extensions to the entity. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems. * - mappings - - `Mapping <../gks-common/core.json#/$defs/Mapping>`_ + - `ConceptMapping <../gks-common/common.json#/$defs/ConceptMapping>`_ - 0..m - - + - A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation. + * - members + - `Variation <../vrs/vrs.yaml#/$defs/Variation>`_ | `IRI <../gks-common/common.yaml#/$defs/IRI>`_ + - 0..m + - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. * - type - string - 1..1 - MUST be "CategoricalCnv" - * - aliases - - string - - 0..m - - Aliases are alternate labels for a Domain Entity. - * - members - - `Variation <../vrs/vrs.yaml#/$defs/Variation>`_ | `IRI <../gks-common/core.yaml#/$defs/IRI>`_ - - 0..m - - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. * - constraints - :ref:`Constraint` - 0..m diff --git a/schema/catvrs/def/CategoricalVariation.rst b/schema/catvrs/def/CategoricalVariation.rst index e54cbe3..bd01f4d 100644 --- a/schema/catvrs/def/CategoricalVariation.rst +++ b/schema/catvrs/def/CategoricalVariation.rst @@ -4,7 +4,7 @@ A representation of a categorically-defined domain for variation, in which indiv **Information Model** -Some CategoricalVariation attributes are inherited from :ref:`gks.core:DomainEntity`. +Some CategoricalVariation attributes are inherited from :ref:`gks.common:DomainEntity`. .. list-table:: :class: clean-wrap @@ -19,33 +19,33 @@ Some CategoricalVariation attributes are inherited from :ref:`gks.core:DomainEnt * - id - string - 0..1 - - 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). + - 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). + * - type + - string + - 1..1 + - * - label - string - 0..1 - - A primary label for the entity. + - A primary name for the entity. * - description - string - 0..1 - A free-text description of the entity. + * - alternativeLabels + - string + - 0..m + - Alternative name(s) for the Entity. * - extensions - - `Extension <../gks-common/core.json#/$defs/Extension>`_ + - `Extension <../gks-common/common.json#/$defs/Extension>`_ - 0..m - - + - A list of extensions to the entity. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems. * - mappings - - `Mapping <../gks-common/core.json#/$defs/Mapping>`_ - - 0..m - - - * - type - - string - - 1..1 - - - * - aliases - - string + - `ConceptMapping <../gks-common/common.json#/$defs/ConceptMapping>`_ - 0..m - - Aliases are alternate labels for a Domain Entity. + - A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation. * - members - - `Variation <../vrs/vrs.yaml#/$defs/Variation>`_ | `IRI <../gks-common/core.yaml#/$defs/IRI>`_ + - `Variation <../vrs/vrs.yaml#/$defs/Variation>`_ | `IRI <../gks-common/common.yaml#/$defs/IRI>`_ - 0..m - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. * - constraints diff --git a/schema/catvrs/def/DescribedVariation.rst b/schema/catvrs/def/DescribedVariation.rst index 72bf164..49d4e6a 100644 --- a/schema/catvrs/def/DescribedVariation.rst +++ b/schema/catvrs/def/DescribedVariation.rst @@ -19,27 +19,27 @@ Some DescribedVariation attributes are inherited from :ref:`CategoricalVariation * - id - string - 0..1 - - 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). + - 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). + * - alternativeLabels + - string + - 0..m + - Alternative name(s) for the Entity. * - extensions - - `Extension <../gks-common/core.json#/$defs/Extension>`_ + - `Extension <../gks-common/common.json#/$defs/Extension>`_ - 0..m - - + - A list of extensions to the entity. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems. * - mappings - - `Mapping <../gks-common/core.json#/$defs/Mapping>`_ + - `ConceptMapping <../gks-common/common.json#/$defs/ConceptMapping>`_ - 0..m - - + - A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation. + * - members + - `Variation <../vrs/vrs.yaml#/$defs/Variation>`_ | `IRI <../gks-common/common.yaml#/$defs/IRI>`_ + - 0..m + - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. * - type - string - 1..1 - MUST be "DescribedVariation" - * - aliases - - string - - 0..m - - Aliases are alternate labels for a Domain Entity. - * - members - - `Variation <../vrs/vrs.yaml#/$defs/Variation>`_ | `IRI <../gks-common/core.yaml#/$defs/IRI>`_ - - 0..m - - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. * - constraints - :ref:`Constraint` - 0..m diff --git a/schema/catvrs/def/ProteinSequenceConsequence.rst b/schema/catvrs/def/ProteinSequenceConsequence.rst index 704d690..bc35a46 100644 --- a/schema/catvrs/def/ProteinSequenceConsequence.rst +++ b/schema/catvrs/def/ProteinSequenceConsequence.rst @@ -19,40 +19,40 @@ Some ProteinSequenceConsequence attributes are inherited from :ref:`CategoricalV * - id - string - 0..1 - - 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). + - 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 - string - 0..1 - - A primary label for the entity. + - A primary name for the entity. * - description - string - 0..1 - A free-text description of the entity. + * - alternativeLabels + - string + - 0..m + - Alternative name(s) for the Entity. * - extensions - - `Extension <../gks-common/core.json#/$defs/Extension>`_ + - `Extension <../gks-common/common.json#/$defs/Extension>`_ - 0..m - - + - A list of extensions to the entity. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems. * - mappings - - `Mapping <../gks-common/core.json#/$defs/Mapping>`_ + - `ConceptMapping <../gks-common/common.json#/$defs/ConceptMapping>`_ - 0..m - - + - A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation. + * - members + - `Variation <../vrs/vrs.yaml#/$defs/Variation>`_ | `IRI <../gks-common/common.yaml#/$defs/IRI>`_ + - 0..m + - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. * - type - string - 1..1 - MUST be "ProteinSequenceConsequence" - * - aliases - - string - - 0..m - - Aliases are alternate labels for a Domain Entity. - * - members - - `Variation <../vrs/vrs.yaml#/$defs/Variation>`_ | `IRI <../gks-common/core.yaml#/$defs/IRI>`_ - - 0..m - - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. * - constraints - :ref:`Constraint` - 0..m - * - definingContext - - `Allele <../vrs/vrs.yaml#/$defs/Allele>`_ | `IRI <../gks-common/core.yaml#/$defs/IRI>`_ + - `Allele <../vrs/vrs.yaml#/$defs/Allele>`_ | `IRI <../gks-common/common.yaml#/$defs/IRI>`_ - 1..1 - The `VRS Allele `_ object that is congruent with (projects to the same codons) as alleles on other protein reference sequences. diff --git a/schema/catvrs/defs/catvrs/CanonicalAllele.rst b/schema/catvrs/defs/catvrs/CanonicalAllele.rst deleted file mode 100644 index 111c2e4..0000000 --- a/schema/catvrs/defs/catvrs/CanonicalAllele.rst +++ /dev/null @@ -1,54 +0,0 @@ -**Computational Definition** - -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. - - **Information Model** - -Some CanonicalAllele attributes are inherited from :ref:`CategoricalVariation`. - - .. list-table:: - :class: clean-wrap - :header-rows: 1 - :align: left - :widths: auto - - * - Field - - Type - - Limits - - Description - * - id - - string - - 0..1 - - 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 - - string - - 0..1 - - A primary label for the entity. - * - description - - string - - 0..1 - - A free-text description of the entity. - * - extensions - - `Extension `_ - - 0..m - - - * - mappings - - `Mapping `_ - - 0..m - - - * - type - - string - - 1..1 - - MUST be "CanonicalAllele" - * - aliases - - string - - 0..m - - Aliases are alternate labels for a Domain Entity. - * - members - - `Variation `_ | `IRI `_ - - 0..m - - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. - * - definingContext - - `Allele `_ | `IRI `_ - - 1..1 - - The `VRS Allele `_ object that is congruent with variants on alternate reference sequences. diff --git a/schema/catvrs/defs/catvrs/CategoricalCnv.rst b/schema/catvrs/defs/catvrs/CategoricalCnv.rst deleted file mode 100644 index 76cf94a..0000000 --- a/schema/catvrs/defs/catvrs/CategoricalCnv.rst +++ /dev/null @@ -1,66 +0,0 @@ -**Computational Definition** - -A categorical variation domain is defined first by a sequence derived from a canonical `Location `_ , 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. - - **Information Model** - -Some CategoricalCnv attributes are inherited from :ref:`CategoricalVariation`. - - .. list-table:: - :class: clean-wrap - :header-rows: 1 - :align: left - :widths: auto - - * - Field - - Type - - Limits - - Description - * - id - - string - - 0..1 - - 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 - - string - - 0..1 - - A primary label for the entity. - * - description - - string - - 0..1 - - A free-text description of the entity. - * - extensions - - `Extension `_ - - 0..m - - - * - mappings - - `Mapping `_ - - 0..m - - - * - type - - string - - 1..1 - - MUST be "CategoricalCnv" - * - aliases - - string - - 0..m - - Aliases are alternate labels for a Domain Entity. - * - members - - `Variation `_ | `IRI `_ - - 0..m - - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. - * - location - - {'$ref': 'vrs.json#/$defs/Location'} - - 1..1 - - A `VRS Location `_ object that represents a sequence derived from that location, and is congruent with locations on alternate reference sequences. - * - locationMatchCharacteristic - - string - - 0..1 - - 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 - - string - - 0..1 - - 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 - - integer | `Range `_ - - 0..1 - - The integral number of copies of the subject in a system. diff --git a/schema/catvrs/defs/catvrs/CategoricalVariation.rst b/schema/catvrs/defs/catvrs/CategoricalVariation.rst deleted file mode 100644 index 94c3fad..0000000 --- a/schema/catvrs/defs/catvrs/CategoricalVariation.rst +++ /dev/null @@ -1,50 +0,0 @@ -**Computational Definition** - -A representation of a categorically-defined domain for variation, in which individual contextual variation instances may be members of the domain. - - **Information Model** - -Some CategoricalVariation attributes are inherited from :ref:`gks.core:DomainEntity`. - - .. list-table:: - :class: clean-wrap - :header-rows: 1 - :align: left - :widths: auto - - * - Field - - Type - - Limits - - Description - * - id - - string - - 0..1 - - 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 - - string - - 0..1 - - A primary label for the entity. - * - description - - string - - 0..1 - - A free-text description of the entity. - * - extensions - - `Extension `_ - - 0..m - - - * - mappings - - `Mapping `_ - - 0..m - - - * - type - - string - - 1..1 - - - * - aliases - - string - - 0..m - - Aliases are alternate labels for a Domain Entity. - * - members - - `Variation `_ | `IRI `_ - - 0..m - - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. diff --git a/schema/catvrs/defs/catvrs/DescribedVariation.rst b/schema/catvrs/defs/catvrs/DescribedVariation.rst deleted file mode 100644 index af37a41..0000000 --- a/schema/catvrs/defs/catvrs/DescribedVariation.rst +++ /dev/null @@ -1,50 +0,0 @@ -**Computational Definition** - -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. - - **Information Model** - -Some DescribedVariation attributes are inherited from :ref:`CategoricalVariation`. - - .. list-table:: - :class: clean-wrap - :header-rows: 1 - :align: left - :widths: auto - - * - Field - - Type - - Limits - - Description - * - id - - string - - 0..1 - - 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). - * - extensions - - `Extension `_ - - 0..m - - - * - mappings - - `Mapping `_ - - 0..m - - - * - type - - string - - 1..1 - - MUST be "DescribedVariation" - * - aliases - - string - - 0..m - - Aliases are alternate labels for a Domain Entity. - * - members - - `Variation `_ | `IRI `_ - - 0..m - - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. - * - label - - string - - 1..1 - - A primary label for the categorical variation. This required property should provide a short and descriptive textual representation of the concept. - * - description - - string - - 0..1 - - A textual description of the domain of variation that should match the categorical variation entity. diff --git a/schema/catvrs/defs/catvrs/ProteinSequenceConsequence.rst b/schema/catvrs/defs/catvrs/ProteinSequenceConsequence.rst deleted file mode 100644 index 398fcbc..0000000 --- a/schema/catvrs/defs/catvrs/ProteinSequenceConsequence.rst +++ /dev/null @@ -1,54 +0,0 @@ -**Computational Definition** - -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). - - **Information Model** - -Some ProteinSequenceConsequence attributes are inherited from :ref:`CategoricalVariation`. - - .. list-table:: - :class: clean-wrap - :header-rows: 1 - :align: left - :widths: auto - - * - Field - - Type - - Limits - - Description - * - id - - string - - 0..1 - - 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 - - string - - 0..1 - - A primary label for the entity. - * - description - - string - - 0..1 - - A free-text description of the entity. - * - extensions - - `Extension `_ - - 0..m - - - * - mappings - - `Mapping `_ - - 0..m - - - * - type - - string - - 1..1 - - MUST be "ProteinSequenceConsequence" - * - aliases - - string - - 0..m - - Aliases are alternate labels for a Domain Entity. - * - members - - `Variation `_ | `IRI `_ - - 0..m - - A non-exhaustive list of VRS variation contexts that satisfy the constraints of this categorical variant. - * - definingContext - - `Allele `_ | `IRI `_ - - 1..1 - - The `VRS Allele `_ object that is congruent with (projects to the same codons) as alleles on other protein reference sequences. diff --git a/schema/catvrs/json/CanonicalAllele b/schema/catvrs/json/CanonicalAllele index 3df8187..5a21033 100644 --- a/schema/catvrs/json/CanonicalAllele +++ b/schema/catvrs/json/CanonicalAllele @@ -8,43 +8,39 @@ "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)." + "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": "A primary name for the entity." }, "description": { "type": "string", "description": "A free-text description of the entity." }, + "alternativeLabels": { + "type": "array", + "ordered": false, + "items": { + "type": "string" + }, + "description": "Alternative name(s) for the Entity." + }, "extensions": { "type": "array", "ordered": true, "items": { "$ref": "/ga4gh/schema/gks-common/1.x/json/Extension" - } + }, + "description": "A list of extensions to the entity. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems." }, "mappings": { "type": "array", "ordered": false, "items": { - "$ref": "/ga4gh/schema/gks-common/1.x/json/Mapping" - } - }, - "type": { - "type": "string", - "const": "CanonicalAllele", - "default": "CanonicalAllele", - "description": "MUST be \"CanonicalAllele\"" - }, - "aliases": { - "description": "Aliases are alternate labels for a Domain Entity.", - "ordered": false, - "type": "array", - "items": { - "type": "string" - } + "$ref": "/ga4gh/schema/gks-common/1.x/json/ConceptMapping" + }, + "description": "A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation." }, "members": { "type": "array", @@ -66,7 +62,12 @@ "ordered": false, "items": { "$ref": "/ga4gh/schema/catvrs/1.x/json/Constraint" - } + }}, + "type": { + "type": "string", + "const": "CanonicalAllele", + "default": "CanonicalAllele", + "description": "MUST be \"CanonicalAllele\"" }, "definingContext": { "oneOf": [ diff --git a/schema/catvrs/json/CategoricalCnv b/schema/catvrs/json/CategoricalCnv index 6c4b201..53f290d 100644 --- a/schema/catvrs/json/CategoricalCnv +++ b/schema/catvrs/json/CategoricalCnv @@ -8,43 +8,39 @@ "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)." + "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": "A primary name for the entity." }, "description": { "type": "string", "description": "A free-text description of the entity." }, + "alternativeLabels": { + "type": "array", + "ordered": false, + "items": { + "type": "string" + }, + "description": "Alternative name(s) for the Entity." + }, "extensions": { "type": "array", "ordered": true, "items": { "$ref": "/ga4gh/schema/gks-common/1.x/json/Extension" - } + }, + "description": "A list of extensions to the entity. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems." }, "mappings": { "type": "array", "ordered": false, "items": { - "$ref": "/ga4gh/schema/gks-common/1.x/json/Mapping" - } - }, - "type": { - "type": "string", - "const": "CategoricalCnv", - "default": "CategoricalCnv", - "description": "MUST be \"CategoricalCnv\"" - }, - "aliases": { - "description": "Aliases are alternate labels for a Domain Entity.", - "ordered": false, - "type": "array", - "items": { - "type": "string" - } + "$ref": "/ga4gh/schema/gks-common/1.x/json/ConceptMapping" + }, + "description": "A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation." }, "members": { "type": "array", @@ -66,7 +62,12 @@ "ordered": false, "items": { "$ref": "/ga4gh/schema/catvrs/1.x/json/Constraint" - } + }}, + "type": { + "type": "string", + "const": "CategoricalCnv", + "default": "CategoricalCnv", + "description": "MUST be \"CategoricalCnv\"" }, "location": { "type": { diff --git a/schema/catvrs/json/DescribedVariation b/schema/catvrs/json/DescribedVariation index 07c3c01..000aff4 100644 --- a/schema/catvrs/json/DescribedVariation +++ b/schema/catvrs/json/DescribedVariation @@ -8,35 +8,31 @@ "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)." + "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)." + }, + "alternativeLabels": { + "type": "array", + "ordered": false, + "items": { + "type": "string" + }, + "description": "Alternative name(s) for the Entity." }, "extensions": { "type": "array", "ordered": true, "items": { "$ref": "/ga4gh/schema/gks-common/1.x/json/Extension" - } + }, + "description": "A list of extensions to the entity. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems." }, "mappings": { "type": "array", "ordered": false, "items": { - "$ref": "/ga4gh/schema/gks-common/1.x/json/Mapping" - } - }, - "type": { - "type": "string", - "const": "DescribedVariation", - "default": "DescribedVariation", - "description": "MUST be \"DescribedVariation\"" - }, - "aliases": { - "description": "Aliases are alternate labels for a Domain Entity.", - "ordered": false, - "type": "array", - "items": { - "type": "string" - } + "$ref": "/ga4gh/schema/gks-common/1.x/json/ConceptMapping" + }, + "description": "A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation." }, "members": { "type": "array", @@ -58,7 +54,12 @@ "ordered": false, "items": { "$ref": "/ga4gh/schema/catvrs/1.x/json/Constraint" - } + }}, + "type": { + "type": "string", + "const": "DescribedVariation", + "default": "DescribedVariation", + "description": "MUST be \"DescribedVariation\"" }, "label": { "type": "string", diff --git a/schema/catvrs/json/ProteinSequenceConsequence b/schema/catvrs/json/ProteinSequenceConsequence index 454d7e7..21f832c 100644 --- a/schema/catvrs/json/ProteinSequenceConsequence +++ b/schema/catvrs/json/ProteinSequenceConsequence @@ -8,43 +8,39 @@ "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)." + "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": "A primary name for the entity." }, "description": { "type": "string", "description": "A free-text description of the entity." }, + "alternativeLabels": { + "type": "array", + "ordered": false, + "items": { + "type": "string" + }, + "description": "Alternative name(s) for the Entity." + }, "extensions": { "type": "array", "ordered": true, "items": { "$ref": "/ga4gh/schema/gks-common/1.x/json/Extension" - } + }, + "description": "A list of extensions to the entity. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems." }, "mappings": { "type": "array", "ordered": false, "items": { - "$ref": "/ga4gh/schema/gks-common/1.x/json/Mapping" - } - }, - "type": { - "type": "string", - "const": "ProteinSequenceConsequence", - "default": "ProteinSequenceConsequence", - "description": "MUST be \"ProteinSequenceConsequence\"" - }, - "aliases": { - "description": "Aliases are alternate labels for a Domain Entity.", - "ordered": false, - "type": "array", - "items": { - "type": "string" - } + "$ref": "/ga4gh/schema/gks-common/1.x/json/ConceptMapping" + }, + "description": "A list of mappings to concepts in terminologies or code systems. Each mapping should include a coding and a relation." }, "members": { "type": "array", @@ -66,7 +62,12 @@ "ordered": false, "items": { "$ref": "/ga4gh/schema/catvrs/1.x/json/Constraint" - } + }}, + "type": { + "type": "string", + "const": "ProteinSequenceConsequence", + "default": "ProteinSequenceConsequence", + "description": "MUST be \"ProteinSequenceConsequence\"" }, "definingContext": { "oneOf": [ diff --git a/schema/gks-domain-entities b/schema/gks-domain-entities new file mode 120000 index 0000000..940a2fa --- /dev/null +++ b/schema/gks-domain-entities @@ -0,0 +1 @@ +../submodules/vrs/schema/gks-domain-entities \ No newline at end of file diff --git a/submodules/vrs b/submodules/vrs index a15dfa1..87f52fa 160000 --- a/submodules/vrs +++ b/submodules/vrs @@ -1 +1 @@ -Subproject commit a15dfa12f436c751aa3e5e77e57703783c62ea6b +Subproject commit 87f52fad00ec757b4d42a1374bdea755e2eb0460