Skip to content

Commit 35f3198

Browse files
committed
conformance enhancements to BEL JGF schema
These changes are meant to address missing schema and harden up property constraints (i.e. additionalProperties). Schema Changes: - Added graph.metadata.bel_version (string type) - default additionalProperties to false where needed - rename biological_context to experiment_context - add evidence.metadata Other Changes: - Updated examples/test.network.json to test for the above schema changes. - Added minitest as a test dependency. fixes #16
1 parent 4ddab01 commit 35f3198

5 files changed

Lines changed: 124 additions & 94 deletions

File tree

.build/Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ gem 'json'
44
gem 'json-schema'
55

66
group :test do
7-
gem 'rake', '~> 10.3'
7+
gem 'rake', '~> 10.3'
8+
gem 'minitest', '~> 5.7'
89
end
910
# vim: ts=2 sw=2

.build/Gemfile.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ GEM
33
specs:
44
json (1.8.1)
55
json-schema (2.2.4)
6+
minitest (5.7.0)
67
rake (10.3.2)
78

89
PLATFORMS
@@ -11,4 +12,8 @@ PLATFORMS
1112
DEPENDENCIES
1213
json
1314
json-schema
15+
minitest (~> 5.7)
1416
rake (~> 10.3)
17+
18+
BUNDLED WITH
19+
1.10.5

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.build/.bundle/
2+
/.build/.gems/

child-schemas/bel-json-graph.schema.json

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
"oneOf": [
55
{
66
"type": "object",
7+
"additionalProperties": false,
78
"properties": {
89
"graph": {
910
"$ref": "#/definitions/graph"
1011
}
1112
},
12-
"additionalProperties": false,
1313
"required": [
1414
"graph"
1515
]
1616
},
1717
{
1818
"type": "object",
19+
"additionalProperties": false,
1920
"properties": {
2021
"label": {
2122
"type": "string",
@@ -41,8 +42,7 @@
4142
"$ref": "#/definitions/graph"
4243
}
4344
}
44-
},
45-
"additionalProperties": false
45+
}
4646
}
4747
],
4848
"definitions": {
@@ -94,6 +94,11 @@
9494
"version": {
9595
"type": "string",
9696
"description": "Version of the graph"
97+
},
98+
"bel_version": {
99+
"type": "string",
100+
"title": "BEL Version",
101+
"description": "The version of BEL (Biological Expression Language) represented in this graph. This version string conforms to the language version as defined by OpenBEL (i.e. 1.0, 2.0, ...)."
97102
}
98103
}
99104
},
@@ -204,6 +209,7 @@
204209
},
205210
"evidence": {
206211
"type": "object",
212+
"additionalProperties": false,
207213
"required": [
208214
"bel_statement",
209215
"citation"
@@ -216,6 +222,7 @@
216222
},
217223
"citation": {
218224
"type": "object",
225+
"additionalProperties": false,
219226
"properties": {
220227
"type": {
221228
"type": "string",
@@ -243,8 +250,15 @@
243250
"title": "Citation for Edge Evidence",
244251
"description": "Citation to support the evidence presented for the Edge"
245252
},
246-
"biological_context": {
253+
"summary_text": {
254+
"type": "string",
255+
"title": "Summary Text",
256+
"description": "Abstract from source text to provide support for this evidence"
257+
},
258+
"experiment_context": {
247259
"type": "object",
260+
"title": "Experiment Context",
261+
"description": "An experiment context specifies the experiment's parameters where this interaction was observed.",
248262
"additionalProperties": true,
249263
"properties": {
250264
"ncbi_tax_id": {
@@ -259,10 +273,14 @@
259273
}
260274
}
261275
},
262-
"summary_text": {
263-
"type": "string",
264-
"title": "Summary Text",
265-
"description": "Abstract from source text to provide support for this evidence"
276+
"metadata": {
277+
"type": [
278+
"object",
279+
"null"
280+
],
281+
"title": "Metadata",
282+
"description": "Metadata for this evidence object. For example this could include application data like reviewer, status, or primary key. If the data is observed within the experiment then it belongs in experiment_context instead.",
283+
"additionalProperties": true
266284
}
267285
}
268286
}

0 commit comments

Comments
 (0)