-
Notifications
You must be signed in to change notification settings - Fork 0
/
nanopub_graphdati-1.0.0.yaml
executable file
·266 lines (249 loc) · 9.18 KB
/
nanopub_graphdati-1.0.0.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
$schema: http://json-schema.org/draft-04/schema#
description: |
NOTE: This schema is NOT an official Nanopub JSON Schema by the
[Nanopub Organization](http://nanopub.org/). It is conceptually derived
from their fine work for the needs of GraphDati.
The purpose of this schema is to manage assertions (labeled as edges in
the schema) and associated metadata such as assertion citation, context and
general metadata. This format is designed for use with GraphDati.
It differs from the nanopub_bel schema due to a stricter specification
of the nanopub.context object in nanobpub_bel.
Please provide feedback as github issues or pull requests at
https://github.com/belbio/schemas.
The master version of this JSON Schema is managed at:
https://github.com/belbio/schemas/blob/master/schemas/nanopub_graphdati-0.9.0.yaml
A nanopub file is either a single nanopub, an array of nanopubs or uses
the JSON Lines (http://jsonlines.org/) format with a nanopub (or schema_uri,
metadata object) per line.
Note: This JSON schema is designed to work with the Swagger Specification as a
schema object which does not allow 'type' to be an array so not able to specify
optional elements as "type": ["string", "null"] for example.
Nanopubs can be stored as either individual JSON files with a single optional
metadata JSON file OR as collection using an array of JSON Nanopubs or a JSONLines
version where each line is a nanopub JSON object. In an array or JSONLines
version, the metadata and schema_uri objects need to be at the top.
Obviously some combinations of the following objects in the anyOf below
are not compatible. It doesn't make sense to use the nanopub object and
array of nanopub objects at the same time.
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: Nanopub collection metadata used to document and validate nanopub collection
type: object
required:
- metadata
description: suggested but not required properties are listed below
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
created, what is consists of, additional contact instructions, etc
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
way of providing an abbreviated namespace to support an unambiguous
namespace value.
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
specific objects required for citations.
The following properties are optional.
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.
Edmunds W, Pebody R, et al. 2000. The sero-epidemiology of
diptheria in Western Europe. Epidemiol Infect 125(1):113-25.
- 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: false
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,
additional notes, etc. Any additional metadata elements can be
added as needed.
Metadata elements apply to the nanopub.
Annotations apply to the assertions.
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.