forked from ga4gh/ga4gh-schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreferencemethods.avdl
633 lines (537 loc) · 19 KB
/
referencemethods.avdl
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
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
@namespace("org.ga4gh.methods")
protocol ReferenceMethods {
import idl "common.avdl";
import idl "methods.avdl";
import idl "references.avdl";
/**************** /mode/{mode} *******************/
/*
See if the server will return fields necessary for interpreting data in the
given mode. If the server supports a mode, it must serve the string "true" at
this URL, and this method will return true on the client side. If the server
does not support a mode, it must return "false".
If the server supports a mode, all fields that that mode requires must be filled
in the server's responses.
Valid modes are currently "classic" and "graph", with the "graph" mode to be
prefered by new client and server implementations.
*/
boolean sendsMode(
/**
The mode to ask about.
*/
string mode) throws GAException;
/**************** /referencesets/search *******************/
/**
This request maps to the body of `POST /referencesets/search`
as JSON.
*/
record SearchReferenceSetsRequest {
/**
If nonempty, return the reference sets which match any of the given
`md5checksum`s. See `ReferenceSet::md5checksum` for details.
*/
array<string> md5checksums = [];
/**
If nonempty, return reference sets for which the accession
matches this string. Best to give a version number (e.g. `GCF_000001405.26`).
If only the main accession number is given then all records with
that main accession will be returned, whichever version.
Note that different versions will have different sequences.
*/
array<string> accessions = [];
/**
If not null, return reference sets for which the `assemblyId`
matches this string (case-sensitive, exact match).
*/
union { null, string } assemblyId = null;
/**
Specifies the maximum number of results to return in a single page.
If unspecified, a system default will be used.
*/
union { null, int } pageSize = null;
/**
The continuation token, which is used to page through large result sets.
To get the next page of results, set this parameter to the value of
`nextPageToken` from the previous response.
*/
union { null, string } pageToken = null;
}
/**
This is the response from `POST /referencesets/search`
expressed as JSON.
*/
record SearchReferenceSetsResponse {
/** The list of matching reference sets. */
array<org.ga4gh.models.ReferenceSet> referenceSets = [];
/**
The continuation token, which is used to page through large result sets.
Provide this value in a subsequent request to return the next page of
results. This field will be empty if there aren't any additional results.
*/
union { null, string } nextPageToken = null;
}
/**
Gets a list of `ReferenceSet` matching the search criteria.
`POST /referencesets/search` must accept a JSON version of
`SearchReferenceSetsRequest` as the post body and will return a JSON
version of `SearchReferenceSetsResponse`.
*/
SearchReferenceSetsResponse searchReferenceSets(
/**
This request maps to the body of `POST /referencesets/search`
as JSON.
*/
SearchReferenceSetsRequest request) throws GAException;
/**************** /referencesets/{id} *******************/
/**
Gets a `ReferenceSet` by ID.
`GET /referencesets/{id}` will return a JSON version of `ReferenceSet`.
*/
org.ga4gh.models.ReferenceSet getReferenceSet(
/**
The ID of the `ReferenceSet`.
*/
string id) throws GAException;
/**************** /references/search *******************/
/**
This request maps to the body of `POST /references/search`
as JSON.
*/
record SearchReferencesRequest {
/**
If not null, return only references which belong to this reference set.
*/
union { null, string } referenceSetId = null;
/**
If nonempty, return only `Reference`s on `Sequence`s with IDs in the list.
*/
array<string> sequenceIds = [];
/**
If nonempty, return references which match any of the given `md5checksums`.
See `Reference::md5checksum` for details.
*/
array<string> md5checksums = [];
/**
If nonempty, return references for which the accession
matches this string. Best to give a version number e.g. `GCF_000001405.26`.
If only the main accession number is given then all records with
that main accession will be returned, whichever version.
Note that different versions will have different sequences.
*/
array<string> accessions = [];
/**
If nonempty, return references that have one of the specified names. The name
specified must match the reference's name exactly, and is case sensitive.
*/
array<string> referenceNames = [];
/**
Specifies the maximum number of results to return in a single page.
If unspecified, a system default will be used.
*/
union { null, int } pageSize = null;
/**
The continuation token, which is used to page through large result sets.
To get the next page of results, set this parameter to the value of
`nextPageToken` from the previous response.
*/
union { null, string } pageToken = null;
}
/**
This is the response from `POST /references/search` expressed as JSON.
*/
record SearchReferencesResponse {
/** The list of matching references. */
array<org.ga4gh.models.Reference> references = [];
/**
The continuation token, which is used to page through large result sets.
Provide this value in a subsequent request to return the next page of
results. This field will be empty if there aren't any additional results.
*/
union { null, string } nextPageToken = null;
}
/**
Gets a list of `Reference` matching the search criteria.
`POST /references/search` must accept a JSON version of
`SearchReferencesRequest` as the post body and will return a JSON
version of `SearchReferencesResponse`.
*/
SearchReferencesResponse searchReferences(
/**
This request maps to the body of `POST /references/search`
as JSON.
*/
SearchReferencesRequest request) throws GAException;
/**************** /references/{id} *******************/
/**
Gets a `Reference` by ID.
`GET /references/{id}` will return a JSON version of `Reference`.
*/
org.ga4gh.models.Reference getReference(
/**
The ID of the `Reference`.
*/
string id) throws GAException;
/**************** /references/{id}/bases *******************/
/**
The query parameters for a request to `GET /references/{id}/bases`, for
example:
`GET /references/{id}/bases?start=100&end=200`
*/
record ListReferenceBasesRequest {
/**
The start position (0-based) of this query. Defaults to 0.
Genomic positions are non-negative integers less than reference length.
Requests spanning the join of circular genomes are represented as
two requests one on each side of the join (position 0).
*/
long start = 0;
/**
The end position (0-based, exclusive) of this query. Defaults
to the length of this `Reference`.
*/
union { null, long } end = null;
/**
The continuation token, which is used to page through large result sets.
To get the next page of results, set this parameter to the value of
`nextPageToken` from the previous response.
*/
union { null, string } pageToken = null;
}
/** The response from `GET /references/{id}/bases` expressed as JSON. */
record ListReferenceBasesResponse {
/**
The offset position (0-based) of the given `sequence` from the start of this
`Reference`. This value will differ for each page in a paginated request.
*/
long offset = 0;
/**
A substring of the bases that make up this reference. Bases are represented
as IUPAC-IUB codes; this string matches the regexp `[ACGTMRWSYKVHDBN]*`.
*/
string sequence;
/**
The continuation token, which is used to page through large result sets.
Provide this value in a subsequent request to return the next page of
results. This field will be empty if there aren't any additional results.
*/
union { null, string } nextPageToken = null;
}
/**
Lists `Reference` bases by ID and optional range.
`GET /references/{id}/bases` will return a JSON version of
`ListReferenceBasesResponse`.
*/
ListReferenceBasesResponse getReferenceBases(
/** The ID of the `Reference`. */
string id,
/** Additional request parameters to restrict the query. */
ListReferenceBasesRequest request) throws GAException;
/****************** /sequences/search *********************/
/**
This request maps to the body of `POST /sequences/search` as JSON. Specifies a
number of filters, all of which must be satisfied by each result returned.
*/
record SearchSequencesRequest {
/**
If not null, return only `Sequence`s that appear in the indicated
`ReferenceSet`, or any included `ReferenceSet`s.
If null, `variantSetId` must not be null.
*/
union { null, string } referenceSetId = null;
/**
If not null, return only `Sequence`s that are part of the indicated
`VariantSet`.
If null, `referenceSetId` must not be null.
*/
union { null, string } variantSetId = null;
/**
Specifies the maximum number of results to return in a single page.
If unspecified, a system default will be used.
*/
union { null, int } pageSize = null;
/**
The continuation token, which is used to page through large result sets.
To get the next page of results, set this parameter to the value of
`nextPageToken` from the previous response.
*/
union { null, string } pageToken = null;
}
/**
This is the response from `POST /sequences/search` expressed as JSON.
*/
record SearchSequencesResponse {
/**
The list of matching `Sequence`s.
*/
array<org.ga4gh.models.Sequence> sequences = [];
/**
The continuation token, which is used to page through large result sets.
Provide this value in a subsequent request to return the next page of
results. This field will be empty if there aren't any additional results.
*/
union { null, string } nextPageToken = null;
}
/**
Gets `Sequence`s that match the search criteria.
`POST /sequences/search` must accept a JSON version of `SearchSequencesRequest`
as the post body and will return a JSON version of `SearchSequencesResponse`.
*/
SearchSequencesResponse searchSequences(
/**
This request maps to the body of `POST /sequences/search` as
JSON.
*/
SearchSequencesRequest request) throws GAException;
/**************** /sequences/{id}/bases *******************/
/**
The query parameters for a request to `GET /sequences/{id}/bases`, for
example:
`GET /sequences/c95d4520-8c63-45f1-924d-6a9604a919fb/bases?start=100&end=200`
*/
/** The response from `GET /sequences/{id}/bases` expressed as JSON. */
record GetSequenceBasesResponse {
/**
The offset position (0-based) of the returned string in the sequence. This
value should match the start request parameter, or be 0.
*/
long offset = 0;
/**
A substring of the sequence requested. Bases are represented as IUPAC-IUB
codes; this string matches the regexp `[ACGTMRWSYKVHDBN]*`.
*/
string sequence;
}
/**
Lists bases by sequence ID and optional range. `GET /sequences/{id}/bases`
will return a JSON version of `GetSequenceBasesResponse`. Works for sequences
with associated `Reference`s, as well as novel sequences that come with
`VariantSet`s.
*/
GetSequenceBasesResponse getSequenceBases(
/** The ID of the sequence. */
string id,
/** Additional request parameters to restrict the query. */
union {null, long} start = null,
union {null, long} end) throws GAException;
/**************** /joins/search *******************/
/**
This request maps to the body of `POST /joins/search` as JSON. Specifies a
number of filters, all of which must be satisfied by each result returned.
*/
record SearchJoinsRequest {
/**
If not null, return only `Join`s which belong to this reference set, or any
included `ReferenceSet`s.
If null, `variantSetId` must not be null.
*/
union { null, string } referenceSetId = null;
/**
If not null, return only `Join`s which belong to this variant set.
If null, `referenceSetId` must not be null.
*/
union { null, string } variantSetId = null;
/**
If not null, return only `Join`s with at least one `Side` on this sequence.
sequences.
If null, `start`, `length`, and `strand` must be null.
*/
union { null, string } sequenceId = null;
/**
If not null, return only `Join`s with at least one `Side` at this index or
later in the `Sequence` specified by `sequenceId`.
If null, `length` must be null.
*/
union { null, long } start = null;
/**
If not null, return only `Join`s with at least one `Side` on the sequence
specified by `sequenceId` in the interval [`start`, `start` + `length`).
*/
union { null, long } length = null;
/**
If not null, return only `Join`s which join onto this strand of the `Sequence`
specified by `sequenceId`.
*/
union { null, org.ga4gh.models.Strand } strand = null;
/**
Specifies the maximum number of results to return in a single page.
If unspecified, a system default will be used.
*/
union { null, int } pageSize = null;
/**
The continuation token, which is used to page through large result sets.
To get the next page of results, set this parameter to the value of
`nextPageToken` from the previous response.
*/
union { null, string } pageToken = null;
}
/**
This is the response from `POST /joins/search` expressed as JSON.
*/
record SearchJoinsResponse {
/** The list of matching joins. */
array<org.ga4gh.models.Join> joins = [];
/**
The continuation token, which is used to page through large result sets.
Provide this value in a subsequent request to return the next page of
results. This field will be empty if there aren't any additional results.
*/
union { null, string } nextPageToken = null;
}
/**
Gets a list of `Join` matching the search criteria.
`POST /joins/search` must accept a JSON version of
`SearchJoinsRequest` as the post body and will return a JSON
version of `SearchJoinsResponse`.
*/
SearchJoinsResponse searchJoins(
/**
This request maps to the body of `POST /joins/search`
as JSON.
*/
SearchJoinsRequest request) throws GAException;
/**************** /subgraph/segments *******************/
/**
This request maps to the body of `POST /subgraph/sequences` as JSON. Specifies
a`Position` and a radius (in bases), and requests all `Segment`s reachable
within that number of bases from that position.
Starting at the specified `Position`, and with a 0 radius denoting only that
`Position`, walk outwards this many bases along all possible paths, traversing
`Join`s only if necessary. All `Segment`s covering all bases visited during this
walk should be returned.
*/
record ExtractSubgraphSegmentsRequest {
/**
If not null, return only `Segment`s of `Sequence`s which belong to this
reference set, or any included `ReferenceSet`s.
If null, `variantSetId` must not be null.
*/
union { null, string } referenceSetId = null;
/**
If not null, return only `Segment`s of `Sequence`s which belong to this
variant set.
If null, `referenceSetId` must not be null.
*/
union { null, string } variantSetId = null;
/**
Base around which the subgraph is to be extracted.
*/
org.ga4gh.models.Position position;
/**
Distance from the `position` to walk along all possible paths, when looking
for bases to include in the returned subgraph.
*/
long radius;
/**
Specifies the maximum number of results to return in a single page.
If unspecified, a system default will be used.
*/
union { null, int } pageSize = null;
/**
The continuation token, which is used to page through large result sets.
To get the next page of results, set this parameter to the value of
`nextPageToken` from the previous response.
*/
union { null, string } pageToken = null;
}
/**
This is the response from `POST /subgraph/segments` expressed as JSON.
*/
record ExtractSubgraphSegmentsResponse {
/**
The list of `Segment`s in the subgraph. `Segment`s are returned in arbitrary
order, and multiple `Segment`s may abut, but each is returned only once and no
two may overlap.
*/
array<org.ga4gh.models.Segment> segments = [];
/**
The continuation token, which is used to page through large result sets.
Provide this value in a subsequent request to return the next page of
results. This field will be empty if there aren't any additional results.
*/
union { null, string } nextPageToken = null;
}
/**
Gets a list of `Segment`s defining the subgraph reachable within a certain
radius of a certain `Position`.
`POST /subgraph/segments` must accept a JSON version of
`ExtractSubgraphSegmentsRequest` as the post body and will return a JSON
version of `ExtractSubgraphSegmentsResponse`.
*/
ExtractSubgraphSegmentsResponse extractSubgraphSegments(
/**
This request maps to the body of `POST /subgraph/segments`
as JSON.
*/
ExtractSubgraphSegmentsRequest request) throws GAException;
/**************** /subgraph/joins *******************/
/**
This request maps to the body of `POST /subgraph/joins` as JSON. Specifies
a`Position` and a radius (in bases), and requests all `Join`s reachable
within that number of bases from that position.
Starting at the specified `Position`, and with a 0 radius denoting only that
`Position`, walk outwards this many bases along all possible paths, traversing
`Join`s only if necessary. All `Join`s traversed during this walk should be
returned.
*/
record ExtractSubgraphJoinsRequest {
/**
If not null, return only `Join`s which belong to this
reference set, or any included `ReferenceSet`s.
If null, `variantSetId` must not be null.
*/
union { null, string } referenceSetId = null;
/**
If not null, return only `Join`s which belong to this variant set.
If null, `referenceSetId` must not be null.
*/
union { null, string } variantSetId = null;
/**
Base around which the subgraph is to be extracted.
*/
org.ga4gh.models.Position position;
/**
Distance from the `position` to walk along all possible paths, when looking
for `Join`s to include in the returned subgraph.
*/
long radius;
/**
Specifies the maximum number of results to return in a single page.
If unspecified, a system default will be used.
*/
union { null, int } pageSize = null;
/**
The continuation token, which is used to page through large result sets.
To get the next page of results, set this parameter to the value of
`nextPageToken` from the previous response.
*/
union { null, string } pageToken = null;
}
/**
This is the response from `POST /subgraph/joins` expressed as JSON.
*/
record ExtractSubgraphJoinsResponse {
/**
The list of `Join`s in the subgraph. `Join`s are returned in arbitrary
order, but each `Join` will be returned only once.
*/
array<org.ga4gh.models.Join> joins = [];
/**
The continuation token, which is used to page through large result sets.
Provide this value in a subsequent request to return the next page of
results. This field will be empty if there aren't any additional results.
*/
union { null, string } nextPageToken = null;
}
/**
Gets a list of `Join`s defining the subgraph reachable within a certain
radius of a certain `Position`.
`POST /subgraph/joins` must accept a JSON version of
`ExtractSubgraphJoinsRequest` as the post body and will return a JSON
version of `ExtractSubgraphJoinsResponse`.
*/
ExtractSubgraphJoinsResponse extractSubgraphJoins(
/**
This request maps to the body of `POST /subgraph/joins`
as JSON.
*/
ExtractSubgraphJoinsRequest request) throws GAException;
}