diff --git a/docs/source/conventions/normalization.rst b/docs/source/conventions/normalization.rst index c72c4949..0b4d12c2 100644 --- a/docs/source/conventions/normalization.rst +++ b/docs/source/conventions/normalization.rst @@ -215,3 +215,6 @@ will be selected by meeting the following ordered criteria. 1. The first of the adjoined sequences MUST have a forward orientation (location defined by `end`). 2. The adjoined sequence accessions are equal or in ascending lexicographical order. 3. The defined adjoined sequence coordinates are in ascending numerical order. + +When adjacencies are used in the context of a :ref:`DerivativeMolecule`, the traversal +direction is definitional and must be specified using a :ref:`TraversalBlock`. \ No newline at end of file diff --git a/examples/sv_derivative_molecule.yaml b/examples/sv_derivative_molecule.yaml index a4e17036..ee99d9a7 100644 --- a/examples/sv_derivative_molecule.yaml +++ b/examples/sv_derivative_molecule.yaml @@ -1,19 +1,16 @@ id: sv_derivative_molecule type: DerivativeMolecule components: - - type: TraversalBlock - orientation: forward - component: - id: 5-prime-terminus - type: Terminus - location: - type: SequenceLocation - sequenceReference: - type: SequenceReference - refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU - residueAlphabet: na - id: NC_000001.10 - end: 123 + - id: 5-prime-terminus + type: Terminus + location: + type: SequenceLocation + sequenceReference: + type: SequenceReference + refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU + residueAlphabet: na + id: NC_000001.10 + end: 123 - type: TraversalBlock orientation: forward component: @@ -37,22 +34,19 @@ components: linker: type: LiteralSequenceExpression sequence: GTC - - type: TraversalBlock - orientation: forward - component: - type: Allele - location: - type: SequenceLocation - start: 601 - end: 602 - sequenceReference: - type: SequenceReference - refgetAccession: SQ.9KdcA9ZpY1Cpvxvg8bMSLYDUpsX6GDLO - residueAlphabet: na - id: NC_000002.11 - state: - type: LiteralSequenceExpression - sequence: C + - type: Allele + location: + type: SequenceLocation + start: 601 + end: 602 + sequenceReference: + type: SequenceReference + refgetAccession: SQ.9KdcA9ZpY1Cpvxvg8bMSLYDUpsX6GDLO + residueAlphabet: na + id: NC_000002.11 + state: + type: LiteralSequenceExpression + sequence: C - type: TraversalBlock orientation: forward component: @@ -73,19 +67,16 @@ components: residueAlphabet: na id: NC_000001.10 end: 1000 - - type: TraversalBlock - orientation: forward - component: - id: 3-prime-terminus - type: Terminus - location: - type: SequenceLocation - sequenceReference: - type: SequenceReference - refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU - residueAlphabet: na - id: NC_000001.10 - start: 1000 + - id: 3-prime-terminus + type: Terminus + location: + type: SequenceLocation + sequenceReference: + type: SequenceReference + refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU + residueAlphabet: na + id: NC_000001.10 + start: 1000 diff --git a/schema/vrs/def/DerivativeMolecule.rst b/schema/vrs/def/DerivativeMolecule.rst index 3754d1ab..c540f873 100644 --- a/schema/vrs/def/DerivativeMolecule.rst +++ b/schema/vrs/def/DerivativeMolecule.rst @@ -49,7 +49,7 @@ Some DerivativeMolecule attributes are inherited from :ref:`Variation`. - 1..1 - MUST be "DerivativeMolecule". * - components - - :ref:`IRI` | :ref:`TraversalBlock` + - :ref:`IRI` | :ref:`Allele` | :ref:`CisPhasedBlock` | :ref:`Terminus` | :ref:`TraversalBlock` - 2..m - The molecular components that constitute the derivative molecule. * - circular diff --git a/schema/vrs/def/TraversalBlock.rst b/schema/vrs/def/TraversalBlock.rst index cfc67172..fdea3174 100644 --- a/schema/vrs/def/TraversalBlock.rst +++ b/schema/vrs/def/TraversalBlock.rst @@ -41,7 +41,7 @@ Some TraversalBlock attributes are inherited from :ref:`gks.core-im:Entity`. - 1..1 - MUST be "TraversalBlock". * - component - - :ref:`Allele` | :ref:`CisPhasedBlock` | :ref:`Adjacency` | :ref:`Terminus` + - :ref:`Adjacency` - 0..1 - The unoriented molecular variation component. * - orientation diff --git a/schema/vrs/json/DerivativeMolecule b/schema/vrs/json/DerivativeMolecule index dd82a489..7034610d 100644 --- a/schema/vrs/json/DerivativeMolecule +++ b/schema/vrs/json/DerivativeMolecule @@ -67,6 +67,15 @@ "ordered": true, "items": { "oneOf": [ + { + "$ref": "/ga4gh/schema/vrs/2.x/json/Allele" + }, + { + "$ref": "/ga4gh/schema/vrs/2.x/json/CisPhasedBlock" + }, + { + "$ref": "/ga4gh/schema/vrs/2.x/json/Terminus" + }, { "$ref": "/ga4gh/schema/vrs/2.x/json/TraversalBlock" }, diff --git a/schema/vrs/json/TraversalBlock b/schema/vrs/json/TraversalBlock index 6b36a44b..2e916934 100644 --- a/schema/vrs/json/TraversalBlock +++ b/schema/vrs/json/TraversalBlock @@ -55,15 +55,6 @@ "oneOf": [ { "$ref": "/ga4gh/schema/vrs/2.x/json/Adjacency" - }, - { - "$ref": "/ga4gh/schema/vrs/2.x/json/Allele" - }, - { - "$ref": "/ga4gh/schema/vrs/2.x/json/CisPhasedBlock" - }, - { - "$ref": "/ga4gh/schema/vrs/2.x/json/Terminus" } ] }, diff --git a/schema/vrs/vrs-source.yaml b/schema/vrs/vrs-source.yaml index 64982738..c17df6f9 100644 --- a/schema/vrs/vrs-source.yaml +++ b/schema/vrs/vrs-source.yaml @@ -586,6 +586,9 @@ $defs: items: oneOf: - $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI" + - $ref: "#/$defs/Allele" + - $ref: "#/$defs/CisPhasedBlock" + - $ref: "#/$defs/Terminus" - $ref: "#/$defs/TraversalBlock" description: >- The molecular components that constitute the derivative molecule. @@ -608,8 +611,8 @@ $defs: - component - orientation description: >- - A component used to describe the orientation of a molecular variation within a - DerivativeMolecule. + A component used to describe the orientation of applicable molecular variation + within a DerivativeMolecule. properties: type: extends: type @@ -620,10 +623,7 @@ $defs: description: >- The unoriented molecular variation component. oneOf: - - $ref: "#/$defs/Allele" - - $ref: "#/$defs/CisPhasedBlock" - $ref: "#/$defs/Adjacency" - - $ref: "#/$defs/Terminus" orientation: type: string description: >-