-
Notifications
You must be signed in to change notification settings - Fork 34
/
vrs-source.yaml
652 lines (613 loc) · 19.6 KB
/
vrs-source.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
# VRS uses yaml as the source document for json schema
#
# To convert vrs.yaml to vrs.json:
# make vrs.jsontype
# You'll probably have to `pip install pyyaml` first.
#
# To watch for changes and update automatically:
# make watch &
# https://json-schema.org/understanding-json-schema/reference/schema.html
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "https://w3id.org/ga4gh/schema/vrs/2.x/vrs-source.yaml"
title: "GA4GH-VRS-Definitions"
type: object
strict: true
imports:
gks-core: ../gks-core/gks-core-source.yaml
namespaces:
gks.core: /ga4gh/schema/gks-core/1.x/json/
$defs:
# VRS definitions are presented top-down. Everything rolls up to
# Variation, which is a polymorphic abstraction of many kinds of
# variation.
# =============================================================================
# Kinds of Variation
# =============================================================================
Ga4ghIdentifiableObject:
maturity: trial use
inherits: gks-core:Entity
description: >-
An object for which a GA4GH computed identifier can be created.
ga4gh:
inherent:
- type
heritableProperties:
type:
type: string
digest:
description: A sha512t24u digest created using the VRS Computed Identifier algorithm.
type: string
pattern: '^[0-9A-Za-z_\-]{32}$'
Variation:
maturity: trial use
inherits: Ga4ghIdentifiableObject
description: >-
A representation of the state of one or more biomolecules.
oneOf:
- $ref: "#/$defs/MolecularVariation"
- $ref: "#/$defs/SystemicVariation"
heritableProperties:
expressions:
type: array
ordered: false
items:
$ref: "#/$defs/Expression"
discriminator:
propertyName: type
Expression:
inherits: gks-core:Element
type: object
maturity: trial use
# protectedClassOf: Variation
description: >-
Representation of a variation by a specified nomenclature or syntax for a Variation object.
Common examples of expressions for the description of molecular variation include the HGVS
and ISCN nomenclatures.
properties:
syntax:
type: string
enum: ["hgvs.c", "hgvs.p", "hgvs.g", "hgvs.m", "hgvs.n", "hgvs.r", "iscn", "gnomad", "spdi"]
description: >-
The syntax used to describe the variation. The value should be one of the supported syntaxes.
value:
type: string
description: >-
The expression of the variation in the specified syntax. The value should be a valid
expression in the specified syntax.
syntax_version:
type: string
description: >-
The version of the syntax used to describe the variation. This is particularly important for
HGVS expressions, as the syntax has evolved over time.
required:
- syntax
- value
MolecularVariation:
inherits: Variation
maturity: trial use
description: >-
A :ref:`variation` on a contiguous molecule.
oneOf:
- $ref: "#/$defs/Allele"
- $ref: "#/$defs/CisPhasedBlock"
- $ref: "#/$defs/Adjacency"
- $ref: "#/$defs/Terminus"
- $ref: "#/$defs/DerivativeMolecule"
discriminator:
propertyName: type
SystemicVariation:
inherits: Variation
maturity: trial use
description: >-
A Variation of multiple molecules in the context of a system, e.g.
a genome, sample, or homologous chromosomes.
oneOf:
- $ref: "#/$defs/CopyNumberCount"
- $ref: "#/$defs/CopyNumberChange"
discriminator:
propertyName: type
# =============================================================================
# IDENTIFIABLE TYPES
# Have a `type` and `_id` attribute
# =============================================================================
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Molecular Variation
Allele:
maturity: trial use
ga4gh:
prefix: VA
inherent:
- location
- state
inherits: MolecularVariation
description: >-
The state of a molecule at a :ref:`Location`.
type: object
properties:
type:
extends: type
const: "Allele"
default: "Allele"
description: >-
MUST be "Allele"
location:
oneOf:
- $refCurie: gks.core:iriReference
- $ref: "#/$defs/Location"
description: >-
The location of the Allele
state:
$ref: "#/$defs/SequenceExpression"
description: >-
An expression of the sequence state
required: [ "location", "state" ]
CisPhasedBlock:
maturity: trial use
ga4gh:
prefix: CPB
inherent:
- members
inherits: MolecularVariation
description: >-
An ordered set of co-occurring :ref:`variants <Variation>` on the same molecule.
type: "object"
properties:
type:
extends: type
const: "CisPhasedBlock"
default: "CisPhasedBlock"
description: >-
MUST be "CisPhasedBlock"
members:
type: array
ordered: false
minItems: 2
uniqueItems: false
items:
oneOf:
- $ref: "#/$defs/Allele"
- $refCurie: gks.core:iriReference
description: >-
A list of :ref:`Alleles <Allele>` that are found in-cis on a shared molecule.
sequenceReference:
$ref: "#/$defs/SequenceReference"
description: >-
An optional Sequence Reference on which all of the in-cis Alleles are found.
When defined, this may be used to implicitly define the `sequenceReference`
attribute for each of the CisPhasedBlock member Alleles.
required: [ "members" ]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# SystemicVariation
CopyNumberCount:
maturity: trial use
ga4gh:
inherent:
- location
- copies
prefix: CN
inherits: SystemicVariation
type: object
description: >-
The absolute count of discrete copies of a :ref:`Location`
within a system (e.g. genome, cell, etc.).
properties:
type:
extends: type
const: "CopyNumberCount"
default: "CopyNumberCount"
description: >-
MUST be "CopyNumberCount"
location:
oneOf:
- $refCurie: gks.core:iriReference
- $ref: "#/$defs/Location"
description: >-
The location of the subject of the copy count.
copies:
oneOf:
- type: integer
- $ref: "#/$defs/Range"
description: >-
The integral number of copies of the subject in a system
required: [ "location", "copies" ]
CopyNumberChange:
maturity: draft
ga4gh:
inherent:
- location
- copyChange
prefix: CX
inherits: SystemicVariation
type: object
description: >-
An assessment of the copy number of a :ref:`Location` within a system (e.g. genome, cell,
etc.) relative to a baseline ploidy.
properties:
type:
extends: type
const: "CopyNumberChange"
default: "CopyNumberChange"
description: >-
MUST be "CopyNumberChange"
location:
oneOf:
- $refCurie: gks.core:iriReference
- $ref: "#/$defs/Location"
description: >-
The location of the subject of the copy change.
copyChange:
$refCurie: gks.core:MappableConcept
description: >-
MUST use a `primaryCode` representing 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: [ "location", "copyChange" ]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Locations
Location:
inherits: Ga4ghIdentifiableObject
maturity: trial use
description: >-
A contiguous segment of a biological sequence.
$ref: "#/$defs/SequenceLocation"
discriminator:
propertyName: type
SequenceLocation:
maturity: trial use
ga4gh:
inherent:
- start
- end
- sequenceReference
prefix: SL
inherits: Location
description: >-
A :ref:`Location` defined by an interval on a referenced :ref:`Sequence`.
type: object
properties:
type:
extends: type
const: "SequenceLocation"
default: "SequenceLocation"
description: MUST be "SequenceLocation"
sequenceReference:
oneOf:
- $refCurie: gks.core:iriReference
- $ref: "#/$defs/SequenceReference"
description: A reference to a :ref:`Sequence` on which the location is defined.
start:
oneOf:
- type: integer
- $ref: "#/$defs/Range"
description: >-
The start coordinate or range of the SequenceLocation.
The minimum value of this coordinate or range is 0.
MUST represent a coordinate or range less than or equal to the value of `end`.
end:
oneOf:
- type: integer
- $ref: "#/$defs/Range"
description: >-
The end coordinate or range of the SequenceLocation.
The minimum value of this coordinate or range is 0.
MUST represent a coordinate or range greater than or equal to the value of `start`.
sequence:
description: >-
The literal sequence encoded by the `sequenceReference` at these coordinates.
$ref: "#/$defs/sequenceString"
SequenceReference:
maturity: trial use
inherits: gks-core:Entity
ga4gh:
inherent:
- refgetAccession
- type
type: object
description: A sequence of nucleic or amino acid character codes.
properties:
type:
extends: type
const: "SequenceReference"
default: "SequenceReference"
description: MUST be "SequenceReference"
refgetAccession:
description: >-
A `GA4GH RefGet <http://samtools.github.io/hts-specs/refget.html>`_ identifier for the referenced sequence,
using the sha512t24u digest.
type: string
pattern: '^SQ.[0-9A-Za-z_\-]{32}$'
residueAlphabet:
type: string
description: >-
The interpretation of the character codes referred to by the refget accession, where "aa" specifies an
amino acid character set, and "na" specifies a nucleic acid character set.
enum:
- aa
- na
sequence:
type:
$ref: "#/$defs/sequenceString"
description: >-
A :ref:`sequenceString` that is a literal representation of the referenced sequence.
moleculeType:
type: string
description: >-
Molecule types as `defined by RefSeq <https://www.ncbi.nlm.nih.gov/books/NBK21091/>`_ (see Table 1).
enum:
- genomic
- RNA
- mRNA
- protein
circular:
type: boolean
description: >-
A boolean indicating whether the molecule represented by the sequence is circular (true) or linear (false).
required: ["refgetAccession"]
# =============================================================================
# NON-IDENTIFIABLE TYPES
# These types have a `type` attribute
# =============================================================================
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# SequenceExpression
SequenceExpression:
maturity: trial use
inherits: gks-core:Entity
ga4gh:
inherent:
- type
description: >-
An expression describing a :ref:`Sequence`.
oneOf:
- $ref: "#/$defs/LiteralSequenceExpression"
- $ref: "#/$defs/ReferenceLengthExpression"
- $ref: "#/$defs/LengthExpression"
discriminator:
propertyName: type
heritableProperties:
type:
extends: type
description: >-
The SequenceExpression class type. MUST match child class type.
heritableRequired:
- type
ReferenceLengthExpression:
maturity: trial use
inherits: SequenceExpression
ga4gh:
inherent:
- length
- repeatSubunitLength
description: >-
An expression of a sequence that is derived from repeating a subsequence
of an associated :ref:`SequenceLocation`.
type: object
properties:
type:
extends: type
const: "ReferenceLengthExpression"
default: "ReferenceLengthExpression"
description: MUST be "ReferenceLengthExpression"
length:
oneOf:
- type: integer
- $ref: "#/$defs/Range"
description: The number of residues in the expressed sequence.
sequence:
$ref: "#/$defs/sequenceString"
description: the literal :ref:`Sequence` encoded by the Reference Length Expression.
repeatSubunitLength:
type: integer
description: The number of residues in the repeat subunit.
required:
- length
- repeatSubunitLength
LengthExpression:
maturity: draft
inherits: SequenceExpression
ga4gh:
inherent:
- length
type: object
description: A sequence expressed only by its length.
properties:
type:
extends: type
const: "LengthExpression"
default: "LengthExpression"
description: MUST be "LengthExpression"
length:
description: The length of the sequence.
oneOf:
- $ref: "#/$defs/Range"
- type: integer
LiteralSequenceExpression:
maturity: trial use
inherits: SequenceExpression
ga4gh:
inherent:
- sequence
description: An explicit expression of a Sequence.
type: object
properties:
type:
extends: type
const: "LiteralSequenceExpression"
default: "LiteralSequenceExpression"
description: MUST be "LiteralSequenceExpression"
sequence:
$ref: "#/$defs/sequenceString"
description: the literal sequence
required:
- sequence
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Numerics, Comparators, and Ranges
Range:
maturity: trial use
description: An inclusive range of values bounded by one or more integers.
type: array
ordered: true
items:
oneOf:
- type: integer
- type: "null"
maxItems: 2
minItems: 2
residue:
maturity: trial use
description: >-
A character representing a specific residue (i.e., molecular species)
or groupings of these ("ambiguity codes"), using `one-letter IUPAC
abbreviations <https://en.wikipedia.org/wiki/International_Union_of_Pure_and_Applied_Chemistry#Amino_acid_and_nucleotide_base_codes>`_
for nucleic acids and amino acids.
type: string
pattern: '[A-Z*\-]'
sequenceString:
maturity: trial use
description: >-
A character string of :ref:`residues <residue>` that represents a biological
sequence using the conventional sequence order (5’-to-3’ for
nucleic acid sequences, and amino-to-carboxyl for amino acid
sequences). IUPAC ambiguity codes are permitted in Sequence Strings.
type: string
pattern: '^[A-Z*\-]*$'
# =============================================================================
# NEW PROPOSED SV Classes
# These classes are not yet organized within the vrs-source.yaml document
# These classes are under active discussion.
# =============================================================================
Adjacency:
maturity: trial use
ga4gh:
prefix: AJ
inherent:
- adjoinedSequences
- linker
inherits: MolecularVariation
description: >-
The `Adjacency` class represents 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:
extends: type
const: Adjacency
default: Adjacency
description: MUST be "Adjacency".
adjoinedSequences:
type: array
uniqueItems: false
ordered: true
items:
oneOf:
- $refCurie: gks.core:iriReference
- $ref: "#/$defs/Location"
not:
required: ["start", "end"]
description: The terminal sequence or pair of adjoined sequences that defines in the adjacency.
minItems: 2
maxItems: 2
linker:
$ref: "#/$defs/SequenceExpression"
description: The sequence found between adjoined sequences.
homology:
type: boolean
maturity: draft
description: >-
A flag indicating if coordinate ambiguity in the adjoined sequences is from sequence homology
(true) or other uncertainty, such as instrument ambiguity (false).
required:
- adjoinedSequences
Terminus:
maturity: draft
ga4gh:
prefix: TM
inherent:
- location
inherits: MolecularVariation
description: >-
The `Terminus` data class provides a structure for describing the end (terminus)
of a molecule. Structurally similar to Adjacency, but used for describing where
a molecule terminates (instead of adjoining another molecule).
type: object
properties:
type:
extends: type
const: Terminus
default: Terminus
description: MUST be "Terminus".
location:
oneOf:
- $refCurie: gks.core:iriReference
- $ref: "#/$defs/Location"
description: The location of the terminus.
required:
- location
DerivativeMolecule:
maturity: draft
ga4gh:
prefix: DM
inherent:
- components
inherits: MolecularVariation
description: >-
A molecule derived from segments of multiple adjoined molecular sequences, typically resulting from
structural variation.
type: object
properties:
type:
extends: type
const: DerivativeMolecule
default: DerivativeMolecule
description: MUST be "DerivativeMolecule".
components:
type: array
uniqueItems: false
ordered: true
items:
oneOf:
- $refCurie: gks.core:iriReference
- $ref: "#/$defs/Allele"
- $ref: "#/$defs/CisPhasedBlock"
- $ref: "#/$defs/Terminus"
- $ref: "#/$defs/TraversalBlock"
description: >-
The molecular components that constitute the derivative molecule.
minItems: 2
circular:
type: boolean
description: >-
A boolean indicating whether the molecule represented by the sequence is circular (true) or linear (false).
required:
- components
TraversalBlock:
maturity: draft
inherits: gks-core:Entity
type: object
# protectedClassOf: DerivativeMolecule
ga4gh:
inherent:
- type
- component
- orientation
description: >-
A component used to describe the orientation of applicable molecular variation
within a DerivativeMolecule.
properties:
type:
extends: type
const: TraversalBlock
default: TraversalBlock
description: MUST be "TraversalBlock".
component:
description: >-
The unoriented molecular variation component.
oneOf:
- $ref: "#/$defs/Adjacency"
orientation:
type: string
description: >-
The orientation of the molecular variation component.
enum:
- "forward"
- "reverse_complement"