-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathOntologyAPI.spec
More file actions
356 lines (314 loc) · 11.6 KB
/
OntologyAPI.spec
File metadata and controls
356 lines (314 loc) · 11.6 KB
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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
/*
A KBase module: OntologyAPI
*/
module OntologyAPI {
/* A boolean. 0 = false, other = true. */
typedef int boolean;
/*
Ontology term id, such as "GO:0000002"
*/
typedef string ID;
/*
Ontology term
*/
typedef structure {
ID id;
string name;
string namespace;
list<string> alt_ids;
UnspecifiedObject def;
list<string> comments;
list<UnspecifiedObject> synonyms;
list<UnspecifiedObject> xrefs;
int created;
int expired;
} Term;
/*
workspace object
*/
typedef structure {
int workspace_id;
int object_id;
int version;
string name;
} WSObj;
/*
workspace genome feature
*/
typedef structure {
string feature_id;
int updated_at;
int workspace_id;
int object_id;
int version;
} Feature;
/*
workspace genome feature, lite version
*/
typedef structure {
string feature_id;
int updated_at;
} FeatureLite;
/*
Ontology terms with associated workspace genome feature
terms - a list of Term object
feature - Feature object
*/
typedef structure {
list<Term> terms;
Feature feature;
} TermsWithWSFeature;
/*
Workspace obj with associated workspace genome features
ws_obj - WSObj object
features - a list of FeatureLite object
*/
typedef structure {
WSObj ws_obj;
list<FeatureLite> features;
} WSObjWithWSFeatures;
/*
Workspace obj with count of associated workspace genome features
feature_count - count of features associated.
ws_obj - WSObj object
*/
typedef structure {
int feature_count;
WSObj ws_obj;
} WSObjectsWithFeatureCount;
/*
Parameters for get_terms
ids - required - a list of ontology term id, such as '["GO:0000002", "GO:0000266"]'
ts - optional - fetch documents with this active timestamp, defaults to now
ns - optional - ontology namespace to use, defaults to "go"
limit - optional - number of results to return (defaults to 20)
offset - optional - number of results to skip (defaults to 0)
*/
typedef structure {
list<ID> ids;
int ts;
string ns;
int limit;
int offset;
} GetTermsParams;
/*
Parameters for get_terms_from_ws_feature
id - required - ontology term id, such as "GO:0016209"
obj_ref - optional - workspace object ref, such as "6976/926/2"
ts - optional - fetch documents with this active timestamp, defaults to now
ns - optional - ontology namespace to use, defaults to "go"
limit - optional - number of results to return (defaults to 20)
offset - optional - number of results to skip (defaults to 0)
*/
typedef structure {
ID id;
string obj_ref;
string ns;
int ts;
int limit;
int offset;
} GetAssociatedWSFeaturesParams;
/*
Parameters for get_terms_from_ws_object
obj_ref - required - workspace object ref, such as "6976/926/2"
ts - optional - fetch documents with this active timestamp, defaults to now
ns - optional - ontology namespace to use, defaults to "go"
limit - optional - number of results to return (defaults to 20)
offset - optional - number of results to skip (defaults to 0)
*/
typedef structure {
string obj_ref;
string ns;
int ts;
int limit;
int offset;
} GetTermsFromWSObjParams;
/*
Parameters for get_terms_from_ws_feature
obj_ref - required - workspace object ref, such as "6976/926/2"
feature_id - required - workspace feature id, such as "b3908"
ts - optional - fetch documents with this active timestamp, defaults to now
ns - optional - ontology namespace to use, defaults to "go"
limit - optional - number of results to return (defaults to 20)
offset - optional - number of results to skip (defaults to 0)
*/
typedef structure {
string obj_ref;
string feature_id;
string ns;
int ts;
int limit;
int offset;
} GetTermsFromWSFeatureParams;
/*
Parameters for get_term_by_name
name - required - ontology name for search, such as "terrestrial biome"
ancestor_term - optional - ontology term id of an ancestor ontology node
ts - optional - fetch documents with this active timestamp, defaults to now
ns - optional - ontology namespace to use, defaults to "go"
limit - optional - number of results to return (defaults to 20)
offset - optional - number of results to skip (defaults to 0)
*/
typedef structure {
string name;
ID ancestor_term;
int ts;
string ns;
int limit;
int offset;
} GetTermByNameParams;
/*
Generic Parameters
id - required - ontology term id, such as "GO:0016209"
ts - optional - fetch documents with this active timestamp, defaults to now
ns - optional - ontology namespace to use, defaults to "go"
limit - optional - number of results to return (defaults to 20)
offset - optional - number of results to skip (defaults to 0)
*/
typedef structure {
ID id;
int ts;
string ns;
int limit;
int offset;
} GenericParams;
/*
Generic results
stats - Query execution information from ArangoDB.
results - array of objects of results.
ts - Timestamp used in the request
ns - Ontology namespace used in the request.
*/
typedef structure {
UnspecifiedObject stats;
list<UnspecifiedObject> results;
int ts;
string ns;
} GenericResults;
/*
Results from get_associated_ws_objects
stats - Query execution information from ArangoDB.
results - array of WSObjectsResults objects.
ts - Timestamp used in the request
ns - Ontology namespace used in the request.
total_count - total count of associated workspace objects
*/
typedef structure {
UnspecifiedObject stats;
list<WSObjectsWithFeatureCount> results;
int ts;
string ns;
int total_count;
} GetAssociatedWSObjectsResults;
/*
Sample data with sample_metadata_key
id - sample id
name - sample name
node_tree - sample metadata
save_date - sample data saved date
version - sample data version
sample_metadata_key - metadata key referencing ontology term
*/
typedef structure {
string id;
string name;
UnspecifiedObject node_tree;
int save_date;
int version;
string sample_metadata_key;
} SampleWithMetadataKey;
/*
Results from get_associated_ws_features
stats - Query execution information from ArangoDB.
results - array of WSObjectsResults objects.
ts - Timestamp used in the request
ns - Ontology namespace used in the request.
total_count - total count of associated workspace features
*/
typedef structure {
UnspecifiedObject stats;
list<WSObjWithWSFeatures> results;
int ts;
string ns;
int total_count;
} GetAssociatedWSFeaturesResults;
/*
Results from get_associated_samples
stats - Query execution information from ArangoDB.
results - array of SampleWithMetadataKey objects.
ts - Timestamp used in the request
ns - Ontology namespace used in the request.
total_count - total count of associated samples
*/
typedef structure {
UnspecifiedObject stats;
list<SampleWithMetadataKey> results;
int ts;
string ns;
int total_count;
} GetAssociatedSamplesResults;
/*
Results from get_terms_from_ws_feature
stats - Query execution information from ArangoDB.
results - array of TermsWithWSFeature objects.
ts - Timestamp used in the request
ns - Ontology namespace used in the request.
*/
typedef structure {
UnspecifiedObject stats;
list<TermsWithWSFeature> results;
int ts;
string ns;
} GetTermsFromWSFeatureResults;
/*
Results from get_terms_from_ws_obj
stats - Query execution information from ArangoDB.
results - array of TermsWithWSFeature objects.
ts - Timestamp used in the request
ns - Ontology namespace used in the request.
*/
typedef structure {
UnspecifiedObject stats;
list<TermsWithWSFeature> results;
int ts;
string ns;
} GetTermsFromWSObjResults;
typedef structure {
UnspecifiedObject namespaces;
} GetNamespacesResults;
/* Retrieve descendants of an ontology term by ID*/
funcdef get_descendants(GenericParams) returns (GenericResults) authentication optional;
/* Retrieve ancestors of an ontology term by ID*/
funcdef get_ancestors(GenericParams) returns (GenericResults) authentication optional;
/* Retrieve children of an ontology term by ID*/
funcdef get_children(GenericParams) returns (GenericResults) authentication optional;
/* Retrieve parents of an ontology term by ID*/
funcdef get_parents(GenericParams) returns (GenericResults) authentication optional;
/* Retrieve related terms of an ontology term by ID*/
funcdef get_related(GenericParams) returns (GenericResults) authentication optional;
/* Retrieve siblings terms of an ontology term by ID*/
funcdef get_siblings(GenericParams) returns (GenericResults) authentication optional;
/* Retrieve metadata of a list of ontology terms by IDs*/
funcdef get_terms(GetTermsParams) returns (GenericResults) authentication optional;
/* Retrieve hierarchical_ancestors of an ontology term by ID*/
funcdef get_hierarchical_ancestors(GenericParams) returns (GenericResults) authentication optional;
/* Retrieve hierarchical_children of an ontology term by ID*/
funcdef get_hierarchical_children(GenericParams) returns (GenericResults) authentication optional;
/* Retrieve hierarchical_descendants of an ontology term by ID*/
funcdef get_hierarchical_descendants(GenericParams) returns (GenericResults) authentication optional;
/* Retrieve hierarchical_parents of an ontology term by ID*/
funcdef get_hierarchical_parents(GenericParams) returns (GenericResults) authentication optional;
/* Retrieve associated workspace genome objects of an ontology term by ID*/
funcdef get_associated_ws_genomes(GenericParams) returns (GetAssociatedWSObjectsResults) authentication optional;
/* Retrieve associated workspace genome features of an ontology term by ID and workspace obj_ref*/
funcdef get_associated_ws_features(GetAssociatedWSFeaturesParams) returns (GetAssociatedWSFeaturesResults) authentication optional;
/* Retrieve ontology terms of an workspace genome feature by workspace obj_ref and feature id*/
funcdef get_terms_from_ws_feature(GetTermsFromWSFeatureParams) returns (GetTermsFromWSFeatureResults) authentication optional;
/* Retrieve ontology terms of an workspace object by workspace obj_ref*/
funcdef get_terms_from_ws_object(GetTermsFromWSObjParams) returns (GetTermsFromWSObjResults) authentication optional;
/* Retrieve associated samples of an ontology term by ID*/
funcdef get_associated_samples(GenericParams) returns (GetAssociatedSamplesResults) authentication optional;
/* Retrieve ontology term by name */
funcdef get_term_by_name(GetTermByNameParams) returns (GenericResults) authentication optional;
funcdef get_namespaces() returns (GetNamespacesResults results) authentication required;
};