-
Notifications
You must be signed in to change notification settings - Fork 0
/
nanopub_graphdati-1.1.0.json
331 lines (331 loc) · 16.6 KB
/
nanopub_graphdati-1.1.0.json
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
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "NOTE: This schema is NOT an official Nanopub JSON Schema by the\n[Nanopub Organization](http://nanopub.org/). It is conceptually derived\nfrom their fine work for the needs of GraphDati.\n\nThe purpose of this schema is to manage assertions (labeled as edges in\nthe schema) and associated metadata such as assertion citation, context and\ngeneral metadata. This format is designed for use with GraphDati.\nIt differs from the nanopub_bel schema due to a stricter specification\nof the nanopub.context object in nanobpub_bel.\n\nPlease provide feedback as github issues or pull requests at\nhttps://github.com/belbio/schemas.\n\nThe master version of this JSON Schema is managed at:\nhttps://github.com/belbio/schemas/blob/master/schemas/nanopub_graphdati-0.9.0.yaml\n\nA nanopub file is either a single nanopub, an array of nanopubs or uses\nthe JSON Lines (http://jsonlines.org/) format with a nanopub (or schema_uri,\nmetadata object) per line.\n\nNote: This JSON schema is designed to work with the Swagger Specification as a\nschema object which does not allow 'type' to be an array so not able to specify\noptional elements as \"type\": [\"string\", \"null\"] for example.\n\nNanopubs can be stored as either individual JSON files with a single optional\nmetadata JSON file OR as collection using an array of JSON Nanopubs or a JSONLines\nversion where each line is a nanopub JSON object. In an array or JSONLines\nversion, the metadata and schema_uri objects need to be at the top.\n\nObviously some combinations of the following objects in the anyOf below\nare not compatible. It doesn't make sense to use the nanopub object and\narray of nanopub objects at the same time.\n\n## CHANGES\n\n### 1.1.0\n\n* Allowed additional properties in the Assertions object\n",
"anyOf": [
{
"$ref": "#/definitions/nanopub"
},
{
"$ref": "#/definitions/schema_uri"
},
{
"$ref": "#/definitions/metadata"
},
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/nanopub"
},
{
"$ref": "#/definitions/schema_uri"
},
{
"$ref": "#/definitions/metadata"
}
]
}
}
],
"definitions": {
"schema_uri": {
"type": "object",
"additionalProperties": false,
"required": [
"schema_uri"
],
"properties": {
"schema_uri": {
"type": "object",
"additionalProperties": false,
"required": [
"uri"
],
"properties": {
"uri": {
"type": "string",
"format": "uri",
"description": "JSON Schema definition URI"
}
}
}
}
},
"metadata": {
"description": "suggested but not required properties are listed below",
"type": "object",
"required": [
"metadata"
],
"properties": {
"metadata": {
"type": "object",
"additionalProperties": true,
"properties": {
"copyright": {
"type": "string"
},
"collection_name": {
"type": "string"
},
"description": {
"type": "string",
"description": "add any additional information here on why this collection was\ncreated, what is consists of, additional contact instructions, etc\n"
},
"version": {
"type": "string"
},
"license": {
"type": "string"
},
"contact": {
"type": "string",
"description": "email address to contact for details on this nanopub collection"
},
"namespaces": {
"type": "array",
"description": "If using a namespace:value entity in your edge or context objects, this provides a\nway of providing an abbreviated namespace to support an unambiguous\nnamespace value.\n",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"uri": {
"type": "string",
"format": "uri"
}
}
}
}
}
}
}
},
"nanopub": {
"description": "Smallest unit of relational knowledge with context (see http://nanopub.org/)",
"type": "object",
"additionalProperties": false,
"required": [
"nanopub"
],
"properties": {
"nanopub": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"citation",
"assertions"
],
"properties": {
"schema_uri": {
"type": "string",
"format": "uri"
},
"id": {
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "ID of nanopub"
},
"type": {
"description": "Type of nanopub: BEL version 2.0.0, PEL, LegEL, etc",
"type": "object",
"additionalProperties": false,
"required": [
"name",
"version"
],
"properties": {
"name": {
"type": "string",
"description": "Name of Nanopub type, e.g. BEL, PEL, LegEL, etc"
},
"version": {
"type": "string",
"description": "Version of Nanopub type, e.g. 2.0.0"
}
}
},
"annotations": {
"description": "Context of the edge[s] (e.g for BEL nanopubs, the species, tissue, disease) or state, or other annotations pertaining to the assertions (bel statements)",
"type": "array",
"items": {
"type": "object"
}
},
"citation": {
"description": "Reference to the source. The specific type of nanopub may have\nspecific objects required for citations.\nThe following properties are optional.\n",
"type": "object",
"additionalProperties": true,
"anyOf": [
{
"required": [
"uri"
]
},
{
"required": [
"database"
]
},
{
"required": [
"reference"
]
}
],
"properties": {
"uri": {
"type": "string",
"format": "uri",
"description": "URL of this citation, e.g. a website cited should have this field"
},
"database": {
"type": "object",
"required": [
"name",
"id"
],
"properties": {
"name": {
"type": "string",
"description": "name of database, e.g. Pubmed, DOI, etc"
},
"id": {
"description": "Source ID of citation, e.g. Pubmed ID for Pubmed citations",
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
}
}
},
"reference": {
"oneOf": [
{
"type": "string",
"description": "Citation as single unparsed string, e.g.\nEdmunds W, Pebody R, et al. 2000. The sero-epidemiology of\ndiptheria in Western Europe. Epidemiol Infect 125(1):113-25.\n"
},
{
"type": "object",
"description": "reference object"
}
]
},
"authors": {
"type": "array",
"items": {
"type": "string"
}
},
"source_name": {
"type": "string",
"description": "name of journal, book, website, database"
},
"source_type": {
"type": "string",
"description": "type of citation, journal, book, website, database"
},
"title": {
"type": "string",
"description": "Title of citation (journal article title, web page title, book chapter title)"
},
"date_published": {
"type": "string",
"description": "ISO Date format, e.g. 2016-12-31 for December 31, 2016"
},
"comments": {
"type": "string",
"description": "Comments about the citation by Nanopub creator(s)"
}
}
},
"assertions": {
"description": "List of assertions (e.g. BEL statements), minimum of 1 assertion required, all annotations apply to all assertions",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": true,
"required": [
"subject"
],
"properties": {
"subject": {
"type": "string"
},
"relation": {
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"object": {
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
}
}
},
"evidence": {
"description": "Any specific summary text that serves as a basis for this edge and context.",
"type": "string"
},
"metadata": {
"description": "Optional metadata elements - Creator information, creation date,\nadditional notes, etc. Any additional metadata elements can be\nadded as needed.\n\nMetadata elements apply to the nanopub.\n\nAnnotations apply to the assertions.\n",
"type": "object",
"additionalProperties": true,
"properties": {
"creation_date": {
"type": "string",
"format": "date"
},
"modification_date": {
"type": "string",
"format": "date"
},
"nanopub_collection": {
"type": "string",
"description": "Name of a set of nanopubs if applicable, used to group nanopubs into sets"
},
"author_name": {
"type": "string"
},
"author_email": {
"type": "string",
"format": "email"
},
"notes": {
"type": "string",
"description": "General notes about Nanopub created by author or editors."
}
}
}
}
}
}
}
}
}