Skip to content

Commit

Permalink
Resolve #456 change sequenceTerminals to adjoinedSequences in Adjacen…
Browse files Browse the repository at this point in the history
…cy (#457)

* applied 'connection' to all related artifacts

* changed `connection` to `adjoinedSequences`

---------

Co-authored-by: Alex H. Wagner, PhD <[email protected]>
  • Loading branch information
larrybabb and ahwagner authored Jan 3, 2024
1 parent ae5cc61 commit 86067b8
Show file tree
Hide file tree
Showing 22 changed files with 120 additions and 70 deletions.
Binary file added docs/source/images/ex_ambiguous_linker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/ex_precise_linker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/ex_revcomp_breakpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/ex_sequence_homology.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/ex_simple_breakpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/ex_sv_haplotype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/ex_terminal_breakend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/ambiguous_linker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: Adjacency
linker:
type: LengthExpression
length: 20000
sequenceTerminals:
adjoinedSequences:
- type: SequenceLocation
sequenceReference:
refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU
Expand Down
2 changes: 1 addition & 1 deletion examples/precise_linker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: Adjacency
linker:
type: LiteralSequenceExpression
sequence: CCCGTC
sequenceTerminals:
adjoinedSequences:
- type: SequenceLocation
sequenceReference:
refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU
Expand Down
2 changes: 1 addition & 1 deletion examples/revcomp_breakpoint.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: truthset_1_1
type: Adjacency
sequenceTerminals:
adjoinedSequences:
- type: SequenceLocation
sequenceReference:
id: NC_000001.10
Expand Down
2 changes: 1 addition & 1 deletion examples/sequence_homology.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: sequence_homology
type: Adjacency
sequenceTerminals:
adjoinedSequences:
- type: SequenceLocation
sequenceReference:
refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_breakpoint.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: simple_breakpoint
type: Adjacency
sequenceTerminals:
adjoinedSequences:
- type: SequenceLocation
sequenceReference:
refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU
Expand Down
7 changes: 4 additions & 3 deletions examples/sv_haplotype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members:
linker:
type: LiteralSequenceExpression
sequence: GTC
sequenceTerminals:
adjoinedSequences:
- type: SequenceLocation
sequenceReference:
refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU
Expand All @@ -29,8 +29,9 @@ members:
sequence: C
- id: ga4gh:AJ.iQ1RGkhW9AyVBLl53silKqgGSBOJaFOr
type: Adjacency
sequenceTerminals:
- end: 15000
adjoinedSequences:
- type: SequenceLocation
end: 15000
- type: SequenceLocation
sequenceReference:
refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU
Expand Down
2 changes: 1 addition & 1 deletion examples/terminal_breakend.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: terminal_breakend
type: Adjacency
sequenceTerminals:
adjoinedSequences:
- type: SequenceLocation
sequenceReference:
refgetAccession: SQ.S_KjnFVz-FE7M0W6yoaUDgYxLPc1jyWU
Expand Down
8 changes: 4 additions & 4 deletions schema/defs/vrs/Adjacency.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**Computational Definition**

The `Adjacency` class represents the termination of a sequence and (when present) the beginning of an adjacent sequence, potentially with an intervening linker sequence.
The `Adjacency` class can represent either the termination of a sequence or the adjoining of the end of a sequence with the beginning of an adjacent sequence, potentially with an intervening linker sequence.

**Information Model**

Expand Down Expand Up @@ -44,11 +44,11 @@ Some Adjacency attributes are inherited from :ref:`Variation`.
- :ref:`Expression`
- 0..m
-
* - sequenceTerminals
* - adjoinedSequences
- `IRI <gks.common.json#/$defs/IRI>`_ | :ref:`Location`
- 1..2
- Sequence terminals involved in the adjacency.
- The terminal sequence or pair of adjoined sequences that defines in the adjacency.
* - linker
- :ref:`SequenceExpression`
- 0..1
- A linker sequence found between the sequence terminals.
- The sequence found between adjoined sequences.
2 changes: 1 addition & 1 deletion schema/defs/vrs/Haplotype.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ Some Haplotype attributes are inherited from :ref:`Variation`.
* - members
- :ref:`Adjacency` | :ref:`Allele` | `IRI <gks.common.json#/$defs/IRI>`_
- 2..m
- A list of :ref:`Alleles <Allele>` and :ref:`Adjacencies <Adjacency>` that comprise a Haplotype. Members must share the same reference sequence as adjacent members. Alleles should not have overlapping or adjacent coordinates with neighboring Alleles. Neighboring alleles should be ordered by ascending coordinates, unless represented on a DNA inversion (following an end-defined sequence terminal), in which case they should be ordered in descending coordinates. Sequence references MUST be consistent for all members between and including the end of one Adjacency and the beginning of another.
- A list of :ref:`Alleles <Allele>` and :ref:`Adjacencies <Adjacency>` that comprise a Haplotype. Members must share the same reference sequence as adjacent members. Alleles should not have overlapping or adjacent coordinates with neighboring Alleles. Neighboring alleles should be ordered by ascending coordinates, unless represented on a DNA inversion (following an Adjacency with end-defined adjoinedSequences), in which case they should be ordered in descending coordinates. Sequence references MUST be consistent for all members between and including the end of one Adjacency and the beginning of another.
14 changes: 7 additions & 7 deletions schema/merged.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
}
]
},
"description": "A list of Alleles that comprise a Haplotype. Members must share the same reference sequence as adjacent members. Alleles should not have overlapping or adjacent coordinates with neighboring Alleles. Neighboring alleles should be ordered by ascending coordinates, unless represented on a DNA inversion (following an end-defined sequence terminal), in which case they should be ordered in descending coordinates. Sequence references MUST be consistent for all members between and including the end of one Adjacency and the beginning of another."
"description": "A list of Alleles that comprise a Haplotype. Members must share the same reference sequence as adjacent members. Alleles should not have overlapping or adjacent coordinates with neighboring Alleles. Neighboring alleles should be ordered by ascending coordinates, unless represented on a DNA inversion (following an Adjacency with end-defined adjoinedSequences), in which case they should be ordered in descending coordinates. Sequence references MUST be consistent for all members between and including the end of one Adjacency and the beginning of another."
}
},
"required": [
Expand Down Expand Up @@ -916,12 +916,12 @@
"ga4ghDigest": {
"prefix": "AJ",
"keys": [
"adjoinedSequences",
"linker",
"sequenceTerminals",
"type"
]
},
"description": "The `Adjacency` class represents the termination of a sequence and (when present) the beginning of an adjacent sequence, potentially with an intervening linker sequence.",
"description": "The `Adjacency` class can represent either the termination of a sequence or the adjoining of the end of a sequence with the beginning of an adjacent sequence, potentially with an intervening linker sequence.",
"type": "object",
"properties": {
"id": {
Expand Down Expand Up @@ -961,7 +961,7 @@
"$ref": "#/$defs/Expression"
}
},
"sequenceTerminals": {
"adjoinedSequences": {
"type": "array",
"uniqueItems": false,
"ordered": true,
Expand All @@ -975,12 +975,12 @@
}
]
},
"description": "Sequence terminals involved in the adjacency.",
"description": "The terminal sequence or pair of adjoined sequences that defines in the adjacency.",
"minItems": 1,
"maxItems": 2
},
"linker": {
"description": "A linker sequence found between the sequence terminals.",
"description": "The sequence found between adjoined sequences.",
"oneOf": [
{
"$ref": "#/$defs/LengthExpression"
Expand All @@ -995,7 +995,7 @@
}
},
"required": [
"sequenceTerminals"
"adjoinedSequences"
],
"additionalProperties": false
},
Expand Down
25 changes: 13 additions & 12 deletions schema/merged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ $defs:
the same reference sequence as adjacent members. Alleles should not have
overlapping or adjacent coordinates with neighboring Alleles. Neighboring
alleles should be ordered by ascending coordinates, unless represented
on a DNA inversion (following an end-defined sequence terminal), in which
case they should be ordered in descending coordinates. Sequence references
MUST be consistent for all members between and including the end of one
Adjacency and the beginning of another.
on a DNA inversion (following an Adjacency with end-defined adjoinedSequences),
in which case they should be ordered in descending coordinates. Sequence
references MUST be consistent for all members between and including the
end of one Adjacency and the beginning of another.
required:
- members
additionalProperties: false
Expand Down Expand Up @@ -699,12 +699,12 @@ $defs:
ga4ghDigest:
prefix: AJ
keys:
- adjoinedSequences
- linker
- sequenceTerminals
- type
description: The `Adjacency` class represents the termination of a sequence and
(when present) the beginning of an adjacent sequence, potentially with an intervening
linker sequence.
description: The `Adjacency` class can represent either the termination of a sequence
or the adjoining of the end of a sequence with the beginning of an adjacent
sequence, potentially with an intervening linker sequence.
type: object
properties:
id:
Expand Down Expand Up @@ -739,25 +739,26 @@ $defs:
ordered: false
items:
$ref: '#/$defs/Expression'
sequenceTerminals:
adjoinedSequences:
type: array
uniqueItems: false
ordered: true
items:
oneOf:
- $ref: '#/$defs/IRI'
- $ref: '#/$defs/SequenceLocation'
description: Sequence terminals involved in the adjacency.
description: The terminal sequence or pair of adjoined sequences that defines
in the adjacency.
minItems: 1
maxItems: 2
linker:
description: A linker sequence found between the sequence terminals.
description: The sequence found between adjoined sequences.
oneOf:
- $ref: '#/$defs/LengthExpression'
- $ref: '#/$defs/LiteralSequenceExpression'
- $ref: '#/$defs/ReferenceLengthExpression'
required:
- sequenceTerminals
- adjoinedSequences
additionalProperties: false
Coding:
type: object
Expand Down
62 changes: 51 additions & 11 deletions schema/vrs-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ $defs:
A list of :ref:`Alleles <Allele>` and :ref:`Adjacencies <Adjacency>` that comprise a Haplotype.
Members must share the same reference sequence as adjacent members. Alleles should not have
overlapping or adjacent coordinates with neighboring Alleles. Neighboring alleles should be ordered
by ascending coordinates, unless represented on a DNA inversion (following an end-defined sequence
terminal), in which case they should be ordered in descending coordinates. Sequence references MUST
be consistent for all members between and including the end of one Adjacency and the beginning of
another.
by ascending coordinates, unless represented on a DNA inversion (following an Adjacency with
end-defined adjoinedSequences), in which case they should be ordered in descending coordinates.
Sequence references MUST be consistent for all members between and including the end of one
Adjacency and the beginning of another.
required: [ "members" ]

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down Expand Up @@ -558,32 +558,72 @@ $defs:
prefix: AJ
keys:
- type
- sequenceTerminals
- adjoinedSequences
- linker
inherits: MolecularVariation
description:
The `Adjacency` class represents the termination of a sequence and (when present)
the beginning of an adjacent sequence, potentially with an intervening linker sequence.
The `Adjacency` class can represent either the termination of a sequence
or the adjoining of the end of a sequence with the beginning of an
adjacent sequence, potentially with an intervening linker sequence.
type: object
properties:
type:
type: string
const: Adjacency
default: Adjacency
description: MUST be "Adjacency".
sequenceTerminals:
adjoinedSequences:
type: array
uniqueItems: false
ordered: true
items:
oneOf:
- $refCurie: gks.core:IRI
- $ref: '#/$defs/Location'
description: Sequence terminals involved in the adjacency.
description: The terminal sequence or pair of adjoined sequences that defines in the adjacency.
minItems: 1
maxItems: 2
linker:
$ref: '#/$defs/SequenceExpression'
description: A linker sequence found between the sequence terminals.
description: The sequence found between adjoined sequences.
# homology:
# # Only valid for breakends=2
# type: boolean
# default: false
# description:
# A flag indicating whether the location interval of the breakend
# is due to the sequences at the breakends being homologous or
# whether the interval is due to uncertainty regarding the actual
# locations of the breakends.
# terminal:
# # TODO: can the schema encode a constraint that a terminal breakend cannot
# # be part of a breakpoint?
# type: boolean
# default: false
# description:
# # Only valid for breakends=1
# Indicates the end of the molecule
required:
- sequenceTerminals
- adjoinedSequences

# Event:
# description:
# An event that results in a set of variants.
# type: object
# properties:
# type:
# type: string
# const: Event
# default: Event
# description: MUST be "Event"
# variants:
# $ref: '#/definitions/VariationSet'
# classification:
# # TODO: what event ontology should we use?
# type: string
# description: Category of event
# required:
# - type
# - variants
# - classification
# additionalProperties: true
14 changes: 7 additions & 7 deletions schema/vrs.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
}
]
},
"description": "A list of Alleles that comprise a Haplotype. Members must share the same reference sequence as adjacent members. Alleles should not have overlapping or adjacent coordinates with neighboring Alleles. Neighboring alleles should be ordered by ascending coordinates, unless represented on a DNA inversion (following an end-defined sequence terminal), in which case they should be ordered in descending coordinates. Sequence references MUST be consistent for all members between and including the end of one Adjacency and the beginning of another."
"description": "A list of Alleles that comprise a Haplotype. Members must share the same reference sequence as adjacent members. Alleles should not have overlapping or adjacent coordinates with neighboring Alleles. Neighboring alleles should be ordered by ascending coordinates, unless represented on a DNA inversion (following an Adjacency with end-defined adjoinedSequences), in which case they should be ordered in descending coordinates. Sequence references MUST be consistent for all members between and including the end of one Adjacency and the beginning of another."
}
},
"required": [
Expand Down Expand Up @@ -916,12 +916,12 @@
"ga4ghDigest": {
"prefix": "AJ",
"keys": [
"adjoinedSequences",
"linker",
"sequenceTerminals",
"type"
]
},
"description": "The `Adjacency` class represents the termination of a sequence and (when present) the beginning of an adjacent sequence, potentially with an intervening linker sequence.",
"description": "The `Adjacency` class can represent either the termination of a sequence or the adjoining of the end of a sequence with the beginning of an adjacent sequence, potentially with an intervening linker sequence.",
"type": "object",
"properties": {
"id": {
Expand Down Expand Up @@ -961,7 +961,7 @@
"$ref": "#/$defs/Expression"
}
},
"sequenceTerminals": {
"adjoinedSequences": {
"type": "array",
"uniqueItems": false,
"ordered": true,
Expand All @@ -975,12 +975,12 @@
}
]
},
"description": "Sequence terminals involved in the adjacency.",
"description": "The terminal sequence or pair of adjoined sequences that defines in the adjacency.",
"minItems": 1,
"maxItems": 2
},
"linker": {
"description": "A linker sequence found between the sequence terminals.",
"description": "The sequence found between adjoined sequences.",
"oneOf": [
{
"$ref": "#/$defs/LengthExpression"
Expand All @@ -995,7 +995,7 @@
}
},
"required": [
"sequenceTerminals"
"adjoinedSequences"
],
"additionalProperties": false
}
Expand Down
Loading

0 comments on commit 86067b8

Please sign in to comment.