Skip to content

Commit

Permalink
Adjacency is the only component in a TraversalBlock
Browse files Browse the repository at this point in the history
`Allele`, `CisPhasedBlock`, and `Terminus` can be specified directly on the `DerivativeMolecule`
  • Loading branch information
Mrinal-Thomas-Epic committed Sep 13, 2024
1 parent f22966a commit c8a8142
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 58 deletions.
3 changes: 3 additions & 0 deletions docs/source/conventions/normalization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
75 changes: 33 additions & 42 deletions examples/sv_derivative_molecule.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand All @@ -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



Expand Down
2 changes: 1 addition & 1 deletion schema/vrs/def/DerivativeMolecule.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion schema/vrs/def/TraversalBlock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions schema/vrs/json/DerivativeMolecule
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
9 changes: 0 additions & 9 deletions schema/vrs/json/TraversalBlock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
},
Expand Down
10 changes: 5 additions & 5 deletions schema/vrs/vrs-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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: >-
Expand Down

0 comments on commit c8a8142

Please sign in to comment.