|
1 | 1 | { |
2 | 2 | "$schema": "http://json-schema.org/draft-04/schema", |
3 | | - "oneOf": [{ |
4 | | - "type": "object", |
5 | | - "properties": { |
6 | | - "graph": { |
7 | | - "$ref": "#/definitions/graph" |
8 | | - } |
9 | | - }, |
10 | | - "additionalProperties": false, |
11 | | - "required": ["graph"] |
12 | | - }, { |
13 | | - "type": "object", |
14 | | - "properties": { |
15 | | - "label": { |
16 | | - "type": "string", |
17 | | - "title": "Graph Set Label", |
18 | | - "description": "Graph Set label", |
19 | | - "name": "graph_set_label" |
20 | | - }, |
21 | | - "type": { |
22 | | - "type": "string", |
23 | | - "title": "Type of Graphs in Set", |
24 | | - "description": "Graph types in graph set", |
25 | | - "name": "graph_set_type" |
26 | | - }, |
27 | | - "metadata": { |
28 | | - "type": ["object", "null"], |
29 | | - "title": "Graph Set Metadata", |
30 | | - "description": "Graph set metadata", |
31 | | - "name": "graph_set_metadata" |
32 | | - }, |
33 | | - "graphs": { |
34 | | - "type": "array", |
35 | | - "items": { |
| 3 | + "description": "Graph data description. Please note that all field keys are to be lowercase and use snake-case (e.g. words are separated by underscores like ncbi_tax_id). Some of the metadata fields are not required but are included as exemplars for generating interoperable BEL JGF files. You may need to provide additional validation programmatically to confirm that the metadata you need for your application exists.", |
| 4 | + "oneOf": [ |
| 5 | + { |
| 6 | + "type": "object", |
| 7 | + "properties": { |
| 8 | + "graph": { |
36 | 9 | "$ref": "#/definitions/graph" |
37 | 10 | } |
38 | | - } |
| 11 | + }, |
| 12 | + "additionalProperties": false, |
| 13 | + "required": [ |
| 14 | + "graph" |
| 15 | + ] |
39 | 16 | }, |
40 | | - "additionalProperties": false |
41 | | - }], |
| 17 | + { |
| 18 | + "type": "object", |
| 19 | + "properties": { |
| 20 | + "label": { |
| 21 | + "type": "string", |
| 22 | + "title": "Graph Set Label", |
| 23 | + "description": "Graph Set label" |
| 24 | + }, |
| 25 | + "type": { |
| 26 | + "type": "string", |
| 27 | + "title": "Type of Graphs in Set", |
| 28 | + "description": "Graph types in graph set" |
| 29 | + }, |
| 30 | + "metadata": { |
| 31 | + "type": [ |
| 32 | + "object", |
| 33 | + "null" |
| 34 | + ], |
| 35 | + "title": "Graph Set Metadata", |
| 36 | + "description": "Graph set metadata" |
| 37 | + }, |
| 38 | + "graphs": { |
| 39 | + "type": "array", |
| 40 | + "items": { |
| 41 | + "$ref": "#/definitions/graph" |
| 42 | + } |
| 43 | + } |
| 44 | + }, |
| 45 | + "additionalProperties": false |
| 46 | + } |
| 47 | + ], |
42 | 48 | "definitions": { |
43 | 49 | "graph": { |
44 | 50 | "type": "object", |
45 | 51 | "additionalProperties": false, |
| 52 | + "title": "Graph or Network data", |
46 | 53 | "properties": { |
47 | 54 | "label": { |
48 | 55 | "type": "string", |
49 | 56 | "title": "Graph Label", |
50 | | - "description": "Graph label", |
51 | | - "name": "graph_label" |
| 57 | + "description": "Graph label" |
52 | 58 | }, |
53 | 59 | "directed": { |
54 | | - "type": ["boolean", "null"], |
| 60 | + "type": [ |
| 61 | + "boolean", |
| 62 | + "null" |
| 63 | + ], |
55 | 64 | "description": "Directed or undirected graph", |
56 | 65 | "default": true |
57 | 66 | }, |
58 | 67 | "type": { |
59 | 68 | "type": "string", |
60 | 69 | "title": "Type of Graph", |
61 | | - "description": "Graph type", |
62 | | - "name": "graph_type" |
| 70 | + "description": "BEL Versioned Graph type" |
63 | 71 | }, |
64 | 72 | "metadata": { |
65 | | - "type": ["object", "null"], |
| 73 | + "type": [ |
| 74 | + "object", |
| 75 | + "null" |
| 76 | + ], |
66 | 77 | "additionalProperties": true, |
67 | 78 | "properties": { |
68 | 79 | "ncbi_tax_id": { |
69 | 80 | "type": "integer", |
70 | | - "title": "NCBI Taxonomy ID - ", |
| 81 | + "title": "NCBI Taxonomy ID", |
71 | 82 | "description": "NCBI Taxonomy ID - http://www.ncbi.nlm.nih.gov/taxonomy" |
72 | 83 | }, |
73 | 84 | "species_common_name": { |
|
79 | 90 | "type": "string", |
80 | 91 | "title": "Graph description", |
81 | 92 | "description": "Graph description" |
| 93 | + }, |
| 94 | + "version": { |
| 95 | + "type": "string", |
| 96 | + "description": "Version of the graph" |
82 | 97 | } |
83 | 98 | } |
84 | 99 | }, |
85 | 100 | "nodes": { |
86 | | - "type": ["array", "null"], |
| 101 | + "type": [ |
| 102 | + "array", |
| 103 | + "null" |
| 104 | + ], |
87 | 105 | "items": { |
88 | 106 | "type": "object", |
89 | 107 | "additionalProperties": false, |
|
95 | 113 | "type": "string" |
96 | 114 | }, |
97 | 115 | "metadata": { |
98 | | - "type": ["object", "null"], |
| 116 | + "type": [ |
| 117 | + "object", |
| 118 | + "null" |
| 119 | + ], |
99 | 120 | "additionalProperties": true, |
100 | 121 | "properties": { |
101 | | - |
102 | | - "x": { |
103 | | - "type": "number", |
104 | | - "title": "X coordinate", |
105 | | - "description": "x coordinate of node location" |
106 | | - }, |
107 | | - "y": { |
108 | | - "type": "number", |
109 | | - "title": "Y coordinate", |
110 | | - "description": "y coordinate of node location" |
| 122 | + "coordinate": { |
| 123 | + "type": "array", |
| 124 | + "items": { |
| 125 | + "type": "number" |
| 126 | + }, |
| 127 | + "minItems": 2, |
| 128 | + "title": "Node coordinates", |
| 129 | + "description": "Node coordinates as either an (x, y) or (x, y, z) tuple, the tuple is unbounded to allow additional dimensions to be used in addition to x, y and z coordinates" |
111 | 130 | }, |
112 | | - "z": { |
113 | | - "type": "number", |
114 | | - "title": "Z coordinate", |
115 | | - "description": "z coordinate of node location - not needed for 2D visualizations" |
| 131 | + "bel_function_type": { |
| 132 | + "type": "string", |
| 133 | + "description": "BEL function types such as proteinAbundance, trancriptionalActivity, etc" |
116 | 134 | } |
117 | 135 | } |
118 | 136 | } |
119 | | - }, |
120 | | - "required": ["id"] |
121 | | - } |
| 137 | + } |
| 138 | + }, |
| 139 | + "required": [ |
| 140 | + "id" |
| 141 | + ] |
122 | 142 | }, |
123 | 143 | "edges": { |
124 | | - "type": ["array", "null"], |
| 144 | + "type": [ |
| 145 | + "array", |
| 146 | + "null" |
| 147 | + ], |
125 | 148 | "items": { |
126 | 149 | "type": "object", |
127 | 150 | "additionalProperties": false, |
128 | 151 | "properties": { |
129 | | - "id": { |
130 | | - "type": "string" |
131 | | - }, |
132 | 152 | "source": { |
133 | 153 | "type": "string", |
134 | 154 | "title": "Source Node", |
|
145 | 165 | "description": "Relationship between nodes in edge - may be directed or undirected" |
146 | 166 | }, |
147 | 167 | "directed": { |
148 | | - "type": ["boolean", "null"], |
| 168 | + "type": [ |
| 169 | + "boolean", |
| 170 | + "null" |
| 171 | + ], |
149 | 172 | "default": true |
150 | 173 | }, |
151 | 174 | "label": { |
152 | 175 | "type": "string" |
153 | 176 | }, |
154 | 177 | "metadata": { |
155 | | - "type": ["object", "null"], |
| 178 | + "type": [ |
| 179 | + "object", |
| 180 | + "null" |
| 181 | + ], |
156 | 182 | "additionalProperties": true, |
157 | 183 | "properties": { |
| 184 | + "causal": { |
| 185 | + "type": "boolean", |
| 186 | + "description": "True if a BEL causal edge type" |
| 187 | + }, |
158 | 188 | "evidences": { |
159 | 189 | "type": "array", |
160 | 190 | "items": { |
|
164 | 194 | } |
165 | 195 | } |
166 | 196 | }, |
167 | | - "required": ["source", "target"] |
| 197 | + "required": [ |
| 198 | + "source", |
| 199 | + "target" |
| 200 | + ] |
168 | 201 | } |
169 | 202 | } |
170 | 203 | } |
171 | 204 | }, |
172 | 205 | "evidence": { |
173 | 206 | "type": "object", |
| 207 | + "required": [ |
| 208 | + "bel_statement", |
| 209 | + "citation" |
| 210 | + ], |
174 | 211 | "properties": { |
175 | 212 | "bel_statement": { |
176 | 213 | "type": "string", |
|
180 | 217 | "citation": { |
181 | 218 | "type": "object", |
182 | 219 | "properties": { |
183 | | - "reference_type": { |
| 220 | + "type": { |
184 | 221 | "type": "string", |
185 | | - "title": "Reference Type", |
186 | | - "description": "The reference type of this citation." |
| 222 | + "enum": [ |
| 223 | + "PubMed", |
| 224 | + "Book", |
| 225 | + "Journal", |
| 226 | + "Online Resource", |
| 227 | + "Other" |
| 228 | + ], |
| 229 | + "title": "Citation Type", |
| 230 | + "description": "The citation type" |
187 | 231 | }, |
188 | | - "reference_id": { |
| 232 | + "id": { |
189 | 233 | "type": "string", |
190 | | - "title": "Reference ID", |
191 | | - "description": "Identifier of the reference, e.g. PubMed ID" |
| 234 | + "title": "Citation ID", |
| 235 | + "description": "Identifier of the citation, e.g. PubMed ID" |
192 | 236 | }, |
193 | 237 | "name": { |
194 | 238 | "type": "string", |
195 | | - "title": "Reference Name", |
196 | | - "description": "Name or citation string for the citation." |
| 239 | + "title": "Citation Name", |
| 240 | + "description": "Name or citation string for the reference." |
197 | 241 | } |
198 | 242 | }, |
199 | 243 | "title": "Citation for Edge Evidence", |
200 | | - "description": "Reference to support the evidence presented for the Edge" |
| 244 | + "description": "Citation to support the evidence presented for the Edge" |
201 | 245 | }, |
202 | 246 | "biological_context": { |
203 | 247 | "type": "object", |
|
0 commit comments