/
vr.yaml
198 lines (167 loc) · 5.1 KB
/
vr.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
$schema: "http://json-schema.org/schema#"
title: "GA4GH-VR-Definitions"
type: object
definitions:
# VR definitions are presented top-down. Everything rolls up to
# Variation, which is a polymorphic abstraction of many kinds of
# variation.
############################################################################
# Variation
Variation:
additionalProperties: false
description: >-
A polymorphic representation of variation
oneOf:
- $ref: "#/definitions/Text"
- $ref: "#/definitions/Allele"
# future expansion of variation types will go here
discriminator:
propertyName: type
Text:
additionalProperties: false
type: object
properties:
type:
type: string
enum: [Text]
default: Text
_id:
$ref: "#/definitions/CURIE"
definition:
type: string
description: >-
An textual representation of variation intended to capture
variation descriptions that cannot be parsed, but still
treated as variation.
Allele:
additionalProperties: false
description: An assertion of a sequence state at a Location.
type: object
properties:
type:
type: string
enum: [Allele]
default: Allele
_id:
$ref: "#/definitions/CURIE"
location:
$ref: "#/definitions/Location"
state:
$ref: "#/definitions/State"
############################################################################
# Locations
Location:
additionalProperties: false
description: >-
A Location represents a span on a specific sequence.
oneOf:
- $ref: "#/definitions/SequenceLocation"
discriminator:
propertyName: type
SequenceLocation:
additionalProperties: false
type: object
properties:
type:
type: string
enum: [SequenceLocation]
default: SequenceLocation
_id:
$ref: "#/definitions/CURIE"
sequence_id:
$ref: "#/definitions/CURIE"
interval:
$ref: "#/definitions/Interval"
############################################################################
# Interval
# * SimpleInterval
Interval:
additionalProperties: false
description: >-
An Interval represents a span of sequence. Positions are
always represented by contiguous spans using interbase
coordinates.
This definition of Interval is intended to be compatible with that
in Sequence Ontology
([SO:0000001](http://www.sequenceontology.org/browser/current_svn/term/SO:0000001)),
with the exception that the GA4GH VR Interval may be
zero-width. The SO definition is for an "extent greater than
zero".
oneOf:
- $ref: '#/definitions/SimpleInterval'
discriminator:
propertyName: type
SimpleInterval:
additionalProperties: false
type: object
properties:
type:
type: string
enum: [SimpleInterval]
default: SimpleInterval
start:
type: integer
nullable: true
end:
type: integer
nullable: true
required:
- start
- end
example:
type: SimpleInterval
start: 11
end: 22
############################################################################
# States
State:
oneOf:
- $ref: "#/definitions/SequenceState"
SequenceState:
additionalProperties: false
type: object
properties:
type:
type: string
enum: [SequenceState]
default: SequenceState
sequence:
type: string
nullable: false
required:
- type
- sequence
example:
type: SequenceState
sequence: C
############################################################################
# Basic types
# These types are used solely within other definitions.
DateTime:
additionalProperties: false
type: string
format: "date-time"
CURIE:
additionalProperties: false
description: >-
A string that refers to an object uniquely. The lifetime and
scope of an id is defined by the sender.
VR does not impose any contraints on strings used as ids in
messages. However, to maximize sharability of data, the VR
Specification RECOMMENDS that implementations use [W3C Compact
URI (CURIE)](https://www.w3.org/TR/curie/) syntax.
String CURIEs are represented as `prefix`:`reference` (W3C
terminology), but often referred to as `namespace`:`accession`
or `namespace`:`local id` colloquially.
The VR specification also RECOMMENDS that `prefix` be defined in
identifiers.org.
The `reference` component is an unconstrained string.
A CURIE is a URI. URIs may *locate* objects (i.e., specify
where to retrieve them) or *name* objects conceptually. VR uses
CURIEs primarily as a naming mechanism.
Implementations MAY provide CURIE resolution mechanisms for
prefixes to make these objects locatable.
Using internal ids in public messages is strongly discouraged.
type: string
pattern: '^\w[^:]+:.+$'
example: "ga4gh:GA.01234abcde"