Debian Codegraph @

third_party/googleapis/google/genomics/v1/variants.proto

raw
1 // Copyright 2016 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.genomics.v1;
18
19 import "google/api/annotations.proto";
20 import "google/longrunning/operations.proto";
21 import "google/protobuf/empty.proto";
22 import "google/protobuf/field_mask.proto";
23 import "google/protobuf/struct.proto";
24
25 option cc_enable_arenas = true;
26 option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
27 option java_multiple_files = true;
28 option java_outer_classname = "VariantsProto";
29 option java_package = "com.google.genomics.v1";
30
31
32 service StreamingVariantService {
33 // Returns a stream of all the variants matching the search request, ordered
34 // by reference name, position, and ID.
35 rpc StreamVariants(StreamVariantsRequest) returns (stream StreamVariantsResponse) {
36 option (google.api.http) = { post: "/v1/variants:stream" body: "*" };
37 }
38 }
39
40 service VariantServiceV1 {
41 // Creates variant data by asynchronously importing the provided information.
42 //
43 // For the definitions of variant sets and other genomics resources, see
44 // [Fundamentals of Google
45 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
46 //
47 // The variants for import will be merged with any existing variant that
48 // matches its reference sequence, start, end, reference bases, and
49 // alternative bases. If no such variant exists, a new one will be created.
50 //
51 // When variants are merged, the call information from the new variant
52 // is added to the existing variant, and Variant info fields are merged
53 // as specified in
54 // [infoMergeConfig][google.genomics.v1.ImportVariantsRequest.info_merge_config].
55 // As a special case, for single-sample VCF files, QUAL and FILTER fields will
56 // be moved to the call level; these are sometimes interpreted in a
57 // call-specific context.
58 // Imported VCF headers are appended to the metadata already in a variant set.
59 rpc ImportVariants(ImportVariantsRequest) returns (google.longrunning.Operation) {
60 option (google.api.http) = { post: "/v1/variants:import" body: "*" };
61 }
62
63 // Creates a new variant set.
64 //
65 // For the definitions of variant sets and other genomics resources, see
66 // [Fundamentals of Google
67 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
68 //
69 // The provided variant set must have a valid `datasetId` set - all other
70 // fields are optional. Note that the `id` field will be ignored, as this is
71 // assigned by the server.
72 rpc CreateVariantSet(CreateVariantSetRequest) returns (VariantSet) {
73 option (google.api.http) = { post: "/v1/variantsets" body: "variant_set" };
74 }
75
76 // Exports variant set data to an external destination.
77 //
78 // For the definitions of variant sets and other genomics resources, see
79 // [Fundamentals of Google
80 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
81 rpc ExportVariantSet(ExportVariantSetRequest) returns (google.longrunning.Operation) {
82 option (google.api.http) = { post: "/v1/variantsets/{variant_set_id}:export" body: "*" };
83 }
84
85 // Gets a variant set by ID.
86 //
87 // For the definitions of variant sets and other genomics resources, see
88 // [Fundamentals of Google
89 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
90 rpc GetVariantSet(GetVariantSetRequest) returns (VariantSet) {
91 option (google.api.http) = { get: "/v1/variantsets/{variant_set_id}" };
92 }
93
94 // Returns a list of all variant sets matching search criteria.
95 //
96 // For the definitions of variant sets and other genomics resources, see
97 // [Fundamentals of Google
98 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
99 //
100 // Implements
101 // [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).
102 rpc SearchVariantSets(SearchVariantSetsRequest) returns (SearchVariantSetsResponse) {
103 option (google.api.http) = { post: "/v1/variantsets/search" body: "*" };
104 }
105
106 // Deletes a variant set including all variants, call sets, and calls within.
107 // This is not reversible.
108 //
109 // For the definitions of variant sets and other genomics resources, see
110 // [Fundamentals of Google
111 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
112 rpc DeleteVariantSet(DeleteVariantSetRequest) returns (google.protobuf.Empty) {
113 option (google.api.http) = { delete: "/v1/variantsets/{variant_set_id}" };
114 }
115
116 // Updates a variant set using patch semantics.
117 //
118 // For the definitions of variant sets and other genomics resources, see
119 // [Fundamentals of Google
120 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
121 rpc UpdateVariantSet(UpdateVariantSetRequest) returns (VariantSet) {
122 option (google.api.http) = { patch: "/v1/variantsets/{variant_set_id}" body: "variant_set" };
123 }
124
125 // Gets a list of variants matching the criteria.
126 //
127 // For the definitions of variants and other genomics resources, see
128 // [Fundamentals of Google
129 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
130 //
131 // Implements
132 // [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).
133 rpc SearchVariants(SearchVariantsRequest) returns (SearchVariantsResponse) {
134 option (google.api.http) = { post: "/v1/variants/search" body: "*" };
135 }
136
137 // Creates a new variant.
138 //
139 // For the definitions of variants and other genomics resources, see
140 // [Fundamentals of Google
141 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
142 rpc CreateVariant(CreateVariantRequest) returns (Variant) {
143 option (google.api.http) = { post: "/v1/variants" body: "variant" };
144 }
145
146 // Updates a variant.
147 //
148 // For the definitions of variants and other genomics resources, see
149 // [Fundamentals of Google
150 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
151 //
152 // This method supports patch semantics. Returns the modified variant without
153 // its calls.
154 rpc UpdateVariant(UpdateVariantRequest) returns (Variant) {
155 option (google.api.http) = { patch: "/v1/variants/{variant_id}" body: "variant" };
156 }
157
158 // Deletes a variant.
159 //
160 // For the definitions of variants and other genomics resources, see
161 // [Fundamentals of Google
162 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
163 rpc DeleteVariant(DeleteVariantRequest) returns (google.protobuf.Empty) {
164 option (google.api.http) = { delete: "/v1/variants/{variant_id}" };
165 }
166
167 // Gets a variant by ID.
168 //
169 // For the definitions of variants and other genomics resources, see
170 // [Fundamentals of Google
171 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
172 rpc GetVariant(GetVariantRequest) returns (Variant) {
173 option (google.api.http) = { get: "/v1/variants/{variant_id}" };
174 }
175
176 // Merges the given variants with existing variants.
177 //
178 // For the definitions of variants and other genomics resources, see
179 // [Fundamentals of Google
180 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
181 //
182 // Each variant will be
183 // merged with an existing variant that matches its reference sequence,
184 // start, end, reference bases, and alternative bases. If no such variant
185 // exists, a new one will be created.
186 //
187 // When variants are merged, the call information from the new variant
188 // is added to the existing variant. Variant info fields are merged as
189 // specified in the
190 // [infoMergeConfig][google.genomics.v1.MergeVariantsRequest.info_merge_config]
191 // field of the MergeVariantsRequest.
192 //
193 // Please exercise caution when using this method! It is easy to introduce
194 // mistakes in existing variants and difficult to back out of them. For
195 // example,
196 // suppose you were trying to merge a new variant with an existing one and
197 // both
198 // variants contain calls that belong to callsets with the same callset ID.
199 //
200 // // Existing variant - irrelevant fields trimmed for clarity
201 // {
202 // "variantSetId": "10473108253681171589",
203 // "referenceName": "1",
204 // "start": "10582",
205 // "referenceBases": "G",
206 // "alternateBases": [
207 // "A"
208 // ],
209 // "calls": [
210 // {
211 // "callSetId": "10473108253681171589-0",
212 // "callSetName": "CALLSET0",
213 // "genotype": [
214 // 0,
215 // 1
216 // ],
217 // }
218 // ]
219 // }
220 //
221 // // New variant with conflicting call information
222 // {
223 // "variantSetId": "10473108253681171589",
224 // "referenceName": "1",
225 // "start": "10582",
226 // "referenceBases": "G",
227 // "alternateBases": [
228 // "A"
229 // ],
230 // "calls": [
231 // {
232 // "callSetId": "10473108253681171589-0",
233 // "callSetName": "CALLSET0",
234 // "genotype": [
235 // 1,
236 // 1
237 // ],
238 // }
239 // ]
240 // }
241 //
242 // The resulting merged variant would overwrite the existing calls with those
243 // from the new variant:
244 //
245 // {
246 // "variantSetId": "10473108253681171589",
247 // "referenceName": "1",
248 // "start": "10582",
249 // "referenceBases": "G",
250 // "alternateBases": [
251 // "A"
252 // ],
253 // "calls": [
254 // {
255 // "callSetId": "10473108253681171589-0",
256 // "callSetName": "CALLSET0",
257 // "genotype": [
258 // 1,
259 // 1
260 // ],
261 // }
262 // ]
263 // }
264 //
265 // This may be the desired outcome, but it is up to the user to determine if
266 // if that is indeed the case.
267 rpc MergeVariants(MergeVariantsRequest) returns (google.protobuf.Empty) {
268 option (google.api.http) = { post: "/v1/variants:merge" body: "*" };
269 }
270
271 // Gets a list of call sets matching the criteria.
272 //
273 // For the definitions of call sets and other genomics resources, see
274 // [Fundamentals of Google
275 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
276 //
277 // Implements
278 // [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178).
279 rpc SearchCallSets(SearchCallSetsRequest) returns (SearchCallSetsResponse) {
280 option (google.api.http) = { post: "/v1/callsets/search" body: "*" };
281 }
282
283 // Creates a new call set.
284 //
285 // For the definitions of call sets and other genomics resources, see
286 // [Fundamentals of Google
287 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
288 rpc CreateCallSet(CreateCallSetRequest) returns (CallSet) {
289 option (google.api.http) = { post: "/v1/callsets" body: "call_set" };
290 }
291
292 // Updates a call set.
293 //
294 // For the definitions of call sets and other genomics resources, see
295 // [Fundamentals of Google
296 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
297 //
298 // This method supports patch semantics.
299 rpc UpdateCallSet(UpdateCallSetRequest) returns (CallSet) {
300 option (google.api.http) = { patch: "/v1/callsets/{call_set_id}" body: "call_set" };
301 }
302
303 // Deletes a call set.
304 //
305 // For the definitions of call sets and other genomics resources, see
306 // [Fundamentals of Google
307 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
308 rpc DeleteCallSet(DeleteCallSetRequest) returns (google.protobuf.Empty) {
309 option (google.api.http) = { delete: "/v1/callsets/{call_set_id}" };
310 }
311
312 // Gets a call set by ID.
313 //
314 // For the definitions of call sets and other genomics resources, see
315 // [Fundamentals of Google
316 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
317 rpc GetCallSet(GetCallSetRequest) returns (CallSet) {
318 option (google.api.http) = { get: "/v1/callsets/{call_set_id}" };
319 }
320 }
321
322 // Metadata describes a single piece of variant call metadata.
323 // These data include a top level key and either a single value string (value)
324 // or a list of key-value pairs (info.)
325 // Value and info are mutually exclusive.
326 message VariantSetMetadata {
327 enum Type {
328 TYPE_UNSPECIFIED = 0;
329
330 INTEGER = 1;
331
332 FLOAT = 2;
333
334 FLAG = 3;
335
336 CHARACTER = 4;
337
338 STRING = 5;
339 }
340
341 // The top-level key.
342 string key = 1;
343
344 // The value field for simple metadata
345 string value = 2;
346
347 // User-provided ID field, not enforced by this API.
348 // Two or more pieces of structured metadata with identical
349 // id and key fields are considered equivalent.
350 string id = 4;
351
352 // The type of data. Possible types include: Integer, Float,
353 // Flag, Character, and String.
354 Type type = 5;
355
356 // The number of values that can be included in a field described by this
357 // metadata.
358 string number = 8;
359
360 // A textual description of this metadata.
361 string description = 7;
362
363 // Remaining structured metadata key-value pairs. This must be of the form
364 // map<string, string[]> (string key mapping to a list of string values).
365 map<string, google.protobuf.ListValue> info = 3;
366 }
367
368 // A variant set is a collection of call sets and variants. It contains summary
369 // statistics of those contents. A variant set belongs to a dataset.
370 //
371 // For more genomics resource definitions, see [Fundamentals of Google
372 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
373 message VariantSet {
374 // The dataset to which this variant set belongs.
375 string dataset_id = 1;
376
377 // The server-generated variant set ID, unique across all variant sets.
378 string id = 2;
379
380 // The reference set to which the variant set is mapped. The reference set
381 // describes the alignment provenance of the variant set, while the
382 // `referenceBounds` describe the shape of the actual variant data. The
383 // reference set's reference names are a superset of those found in the
384 // `referenceBounds`.
385 //
386 // For example, given a variant set that is mapped to the GRCh38 reference set
387 // and contains a single variant on reference 'X', `referenceBounds` would
388 // contain only an entry for 'X', while the associated reference set
389 // enumerates all possible references: '1', '2', 'X', 'Y', 'MT', etc.
390 string reference_set_id = 6;
391
392 // A list of all references used by the variants in a variant set
393 // with associated coordinate upper bounds for each one.
394 repeated ReferenceBound reference_bounds = 5;
395
396 // The metadata associated with this variant set.
397 repeated VariantSetMetadata metadata = 4;
398
399 // User-specified, mutable name.
400 string name = 7;
401
402 // A textual description of this variant set.
403 string description = 8;
404 }
405
406 // A variant represents a change in DNA sequence relative to a reference
407 // sequence. For example, a variant could represent a SNP or an insertion.
408 // Variants belong to a variant set.
409 //
410 // For more genomics resource definitions, see [Fundamentals of Google
411 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
412 //
413 // Each of the calls on a variant represent a determination of genotype with
414 // respect to that variant. For example, a call might assign probability of 0.32
415 // to the occurrence of a SNP named rs1234 in a sample named NA12345. A call
416 // belongs to a call set, which contains related calls typically from one
417 // sample.
418 message Variant {
419 // The ID of the variant set this variant belongs to.
420 string variant_set_id = 15;
421
422 // The server-generated variant ID, unique across all variants.
423 string id = 2;
424
425 // Names for the variant, for example a RefSNP ID.
426 repeated string names = 3;
427
428 // The date this variant was created, in milliseconds from the epoch.
429 int64 created = 12;
430
431 // The reference on which this variant occurs.
432 // (such as `chr20` or `X`)
433 string reference_name = 14;
434
435 // The position at which this variant occurs (0-based).
436 // This corresponds to the first base of the string of reference bases.
437 int64 start = 16;
438
439 // The end position (0-based) of this variant. This corresponds to the first
440 // base after the last base in the reference allele. So, the length of
441 // the reference allele is (end - start). This is useful for variants
442 // that don't explicitly give alternate bases, for example large deletions.
443 int64 end = 13;
444
445 // The reference bases for this variant. They start at the given
446 // position.
447 string reference_bases = 6;
448
449 // The bases that appear instead of the reference bases.
450 repeated string alternate_bases = 7;
451
452 // A measure of how likely this variant is to be real.
453 // A higher value is better.
454 double quality = 8;
455
456 // A list of filters (normally quality filters) this variant has failed.
457 // `PASS` indicates this variant has passed all filters.
458 repeated string filter = 9;
459
460 // A map of additional variant information. This must be of the form
461 // map<string, string[]> (string key mapping to a list of string values).
462 map<string, google.protobuf.ListValue> info = 10;
463
464 // The variant calls for this particular variant. Each one represents the
465 // determination of genotype with respect to this variant.
466 repeated VariantCall calls = 11;
467 }
468
469 // A call represents the determination of genotype with respect to a particular
470 // variant. It may include associated information such as quality and phasing.
471 // For example, a call might assign a probability of 0.32 to the occurrence of
472 // a SNP named rs1234 in a call set with the name NA12345.
473 message VariantCall {
474 // The ID of the call set this variant call belongs to.
475 string call_set_id = 8;
476
477 // The name of the call set this variant call belongs to.
478 string call_set_name = 9;
479
480 // The genotype of this variant call. Each value represents either the value
481 // of the `referenceBases` field or a 1-based index into
482 // `alternateBases`. If a variant had a `referenceBases`
483 // value of `T` and an `alternateBases`
484 // value of `["A", "C"]`, and the `genotype` was
485 // `[2, 1]`, that would mean the call
486 // represented the heterozygous value `CA` for this variant.
487 // If the `genotype` was instead `[0, 1]`, the
488 // represented value would be `TA`. Ordering of the
489 // genotype values is important if the `phaseset` is present.
490 // If a genotype is not called (that is, a `.` is present in the
491 // GT string) -1 is returned.
492 repeated int32 genotype = 7;
493
494 // If this field is present, this variant call's genotype ordering implies
495 // the phase of the bases and is consistent with any other variant calls in
496 // the same reference sequence which have the same phaseset value.
497 // When importing data from VCF, if the genotype data was phased but no
498 // phase set was specified this field will be set to `*`.
499 string phaseset = 5;
500
501 // The genotype likelihoods for this variant call. Each array entry
502 // represents how likely a specific genotype is for this call. The value
503 // ordering is defined by the GL tag in the VCF spec.
504 // If Phred-scaled genotype likelihood scores (PL) are available and
505 // log10(P) genotype likelihood scores (GL) are not, PL scores are converted
506 // to GL scores. If both are available, PL scores are stored in `info`.
507 repeated double genotype_likelihood = 6;
508
509 // A map of additional variant call information. This must be of the form
510 // map<string, string[]> (string key mapping to a list of string values).
511 map<string, google.protobuf.ListValue> info = 2;
512 }
513
514 // A call set is a collection of variant calls, typically for one sample. It
515 // belongs to a variant set.
516 //
517 // For more genomics resource definitions, see [Fundamentals of Google
518 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
519 message CallSet {
520 // The server-generated call set ID, unique across all call sets.
521 string id = 1;
522
523 // The call set name.
524 string name = 2;
525
526 // The sample ID this call set corresponds to.
527 string sample_id = 7;
528
529 // The IDs of the variant sets this call set belongs to. This field must
530 // have exactly length one, as a call set belongs to a single variant set.
531 // This field is repeated for compatibility with the
532 // [GA4GH 0.5.1
533 // API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76).
534 repeated string variant_set_ids = 6;
535
536 // The date this call set was created in milliseconds from the epoch.
537 int64 created = 5;
538
539 // A map of additional call set information. This must be of the form
540 // map<string, string[]> (string key mapping to a list of string values).
541 map<string, google.protobuf.ListValue> info = 4;
542 }
543
544 // ReferenceBound records an upper bound for the starting coordinate of
545 // variants in a particular reference.
546 message ReferenceBound {
547 // The name of the reference associated with this reference bound.
548 string reference_name = 1;
549
550 // An upper bound (inclusive) on the starting coordinate of any
551 // variant in the reference sequence.
552 int64 upper_bound = 2;
553 }
554
555 // The variant data import request.
556 message ImportVariantsRequest {
557 enum Format {
558 FORMAT_UNSPECIFIED = 0;
559
560 // VCF (Variant Call Format). The VCF files may be gzip compressed. gVCF is
561 // also supported.
562 FORMAT_VCF = 1;
563
564 // Complete Genomics masterVarBeta format. The masterVarBeta files may
565 // be bzip2 compressed.
566 FORMAT_COMPLETE_GENOMICS = 2;
567 }
568
569 // Required. The variant set to which variant data should be imported.
570 string variant_set_id = 1;
571
572 // A list of URIs referencing variant files in Google Cloud Storage. URIs can
573 // include wildcards [as described
574 // here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames).
575 // Note that recursive wildcards ('**') are not supported.
576 repeated string source_uris = 2;
577
578 // The format of the variant data being imported. If unspecified, defaults to
579 // to `VCF`.
580 Format format = 3;
581
582 // Convert reference names to the canonical representation.
583 // hg19 haploytypes (those reference names containing "_hap")
584 // are not modified in any way.
585 // All other reference names are modified according to the following rules:
586 // The reference name is capitalized.
587 // The "chr" prefix is dropped for all autosomes and sex chromsomes.
588 // For example "chr17" becomes "17" and "chrX" becomes "X".
589 // All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT".
590 bool normalize_reference_names = 5;
591
592 // A mapping between info field keys and the InfoMergeOperations to
593 // be performed on them. This is plumbed down to the MergeVariantRequests
594 // generated by the resulting import job.
595 map<string, InfoMergeOperation> info_merge_config = 6;
596 }
597
598 // The variant data import response.
599 message ImportVariantsResponse {
600 // IDs of the call sets created during the import.
601 repeated string call_set_ids = 1;
602 }
603
604 // The CreateVariantSet request
605 message CreateVariantSetRequest {
606 // Required. The variant set to be created. Must have a valid `datasetId`.
607 VariantSet variant_set = 1;
608 }
609
610 // The variant data export request.
611 message ExportVariantSetRequest {
612 enum Format {
613 FORMAT_UNSPECIFIED = 0;
614
615 // Export the data to Google BigQuery.
616 FORMAT_BIGQUERY = 1;
617 }
618
619 // Required. The ID of the variant set that contains variant data which
620 // should be exported. The caller must have READ access to this variant set.
621 string variant_set_id = 1;
622
623 // If provided, only variant call information from the specified call sets
624 // will be exported. By default all variant calls are exported.
625 repeated string call_set_ids = 2;
626
627 // Required. The Google Cloud project ID that owns the destination
628 // BigQuery dataset. The caller must have WRITE access to this project. This
629 // project will also own the resulting export job.
630 string project_id = 3;
631
632 // The format for the exported data.
633 Format format = 4;
634
635 // Required. The BigQuery dataset to export data to. This dataset must already
636 // exist. Note that this is distinct from the Genomics concept of "dataset".
637 string bigquery_dataset = 5;
638
639 // Required. The BigQuery table to export data to.
640 // If the table doesn't exist, it will be created. If it already exists, it
641 // will be overwritten.
642 string bigquery_table = 6;
643 }
644
645 // The variant set request.
646 message GetVariantSetRequest {
647 // Required. The ID of the variant set.
648 string variant_set_id = 1;
649 }
650
651 // The search variant sets request.
652 message SearchVariantSetsRequest {
653 // Exactly one dataset ID must be provided here. Only variant sets which
654 // belong to this dataset will be returned.
655 repeated string dataset_ids = 1;
656
657 // The continuation token, which is used to page through large result sets.
658 // To get the next page of results, set this parameter to the value of
659 // `nextPageToken` from the previous response.
660 string page_token = 2;
661
662 // The maximum number of results to return in a single page. If unspecified,
663 // defaults to 1024.
664 int32 page_size = 3;
665 }
666
667 // The search variant sets response.
668 message SearchVariantSetsResponse {
669 // The variant sets belonging to the requested dataset.
670 repeated VariantSet variant_sets = 1;
671
672 // The continuation token, which is used to page through large result sets.
673 // Provide this value in a subsequent request to return the next page of
674 // results. This field will be empty if there aren't any additional results.
675 string next_page_token = 2;
676 }
677
678 // The delete variant set request.
679 message DeleteVariantSetRequest {
680 // The ID of the variant set to be deleted.
681 string variant_set_id = 1;
682 }
683
684 message UpdateVariantSetRequest {
685 // The ID of the variant to be updated (must already exist).
686 string variant_set_id = 1;
687
688 // The new variant data. Only the variant_set.metadata will be considered
689 // for update.
690 VariantSet variant_set = 2;
691
692 // An optional mask specifying which fields to update. Supported fields:
693 //
694 // * [metadata][google.genomics.v1.VariantSet.metadata].
695 // * [name][google.genomics.v1.VariantSet.name].
696 // * [description][google.genomics.v1.VariantSet.description].
697 //
698 // Leaving `updateMask` unset is equivalent to specifying all mutable
699 // fields.
700 google.protobuf.FieldMask update_mask = 5;
701 }
702
703 // The variant search request.
704 message SearchVariantsRequest {
705 // At most one variant set ID must be provided. Only variants from this
706 // variant set will be returned. If omitted, a call set id must be included in
707 // the request.
708 repeated string variant_set_ids = 1;
709
710 // Only return variants which have exactly this name.
711 string variant_name = 2;
712
713 // Only return variant calls which belong to call sets with these ids.
714 // Leaving this blank returns all variant calls. If a variant has no
715 // calls belonging to any of these call sets, it won't be returned at all.
716 repeated string call_set_ids = 3;
717
718 // Required. Only return variants in this reference sequence.
719 string reference_name = 4;
720
721 // The beginning of the window (0-based, inclusive) for which
722 // overlapping variants should be returned. If unspecified, defaults to 0.
723 int64 start = 5;
724
725 // The end of the window, 0-based exclusive. If unspecified or 0, defaults to
726 // the length of the reference.
727 int64 end = 6;
728
729 // The continuation token, which is used to page through large result sets.
730 // To get the next page of results, set this parameter to the value of
731 // `nextPageToken` from the previous response.
732 string page_token = 7;
733
734 // The maximum number of variants to return in a single page. If unspecified,
735 // defaults to 5000. The maximum value is 10000.
736 int32 page_size = 8;
737
738 // The maximum number of calls to return in a single page. Note that this
739 // limit may be exceeded in the event that a matching variant contains more
740 // calls than the requested maximum. If unspecified, defaults to 5000. The
741 // maximum value is 10000.
742 int32 max_calls = 9;
743 }
744
745 // The variant search response.
746 message SearchVariantsResponse {
747 // The list of matching Variants.
748 repeated Variant variants = 1;
749
750 // The continuation token, which is used to page through large result sets.
751 // Provide this value in a subsequent request to return the next page of
752 // results. This field will be empty if there aren't any additional results.
753 string next_page_token = 2;
754 }
755
756 message CreateVariantRequest {
757 // The variant to be created.
758 Variant variant = 1;
759 }
760
761 message UpdateVariantRequest {
762 // The ID of the variant to be updated.
763 string variant_id = 1;
764
765 // The new variant data.
766 Variant variant = 2;
767
768 // An optional mask specifying which fields to update. At this time, mutable
769 // fields are [names][google.genomics.v1.Variant.names] and
770 // [info][google.genomics.v1.Variant.info]. Acceptable values are "names" and
771 // "info". If unspecified, all mutable fields will be updated.
772 google.protobuf.FieldMask update_mask = 3;
773 }
774
775 message DeleteVariantRequest {
776 // The ID of the variant to be deleted.
777 string variant_id = 1;
778 }
779
780 message GetVariantRequest {
781 // The ID of the variant.
782 string variant_id = 1;
783 }
784
785 message MergeVariantsRequest {
786 // The destination variant set.
787 string variant_set_id = 1;
788
789 // The variants to be merged with existing variants.
790 repeated Variant variants = 2;
791
792 // A mapping between info field keys and the InfoMergeOperations to
793 // be performed on them.
794 map<string, InfoMergeOperation> info_merge_config = 3;
795 }
796
797 // The call set search request.
798 message SearchCallSetsRequest {
799 // Restrict the query to call sets within the given variant sets. At least one
800 // ID must be provided.
801 repeated string variant_set_ids = 1;
802
803 // Only return call sets for which a substring of the name matches this
804 // string.
805 string name = 2;
806
807 // The continuation token, which is used to page through large result sets.
808 // To get the next page of results, set this parameter to the value of
809 // `nextPageToken` from the previous response.
810 string page_token = 3;
811
812 // The maximum number of results to return in a single page. If unspecified,
813 // defaults to 1024.
814 int32 page_size = 4;
815 }
816
817 // The call set search response.
818 message SearchCallSetsResponse {
819 // The list of matching call sets.
820 repeated CallSet call_sets = 1;
821
822 // The continuation token, which is used to page through large result sets.
823 // Provide this value in a subsequent request to return the next page of
824 // results. This field will be empty if there aren't any additional results.
825 string next_page_token = 2;
826 }
827
828 message CreateCallSetRequest {
829 // The call set to be created.
830 CallSet call_set = 1;
831 }
832
833 message UpdateCallSetRequest {
834 // The ID of the call set to be updated.
835 string call_set_id = 1;
836
837 // The new call set data.
838 CallSet call_set = 2;
839
840 // An optional mask specifying which fields to update. At this time, the only
841 // mutable field is [name][google.genomics.v1.CallSet.name]. The only
842 // acceptable value is "name". If unspecified, all mutable fields will be
843 // updated.
844 google.protobuf.FieldMask update_mask = 3;
845 }
846
847 message DeleteCallSetRequest {
848 // The ID of the call set to be deleted.
849 string call_set_id = 1;
850 }
851
852 message GetCallSetRequest {
853 // The ID of the call set.
854 string call_set_id = 1;
855 }
856
857 // The stream variants request.
858 message StreamVariantsRequest {
859 // The Google Cloud project ID which will be billed
860 // for this access. The caller must have WRITE access to this project.
861 // Required.
862 string project_id = 1;
863
864 // The variant set ID from which to stream variants.
865 string variant_set_id = 2;
866
867 // Only return variant calls which belong to call sets with these IDs.
868 // Leaving this blank returns all variant calls.
869 repeated string call_set_ids = 3;
870
871 // Required. Only return variants in this reference sequence.
872 string reference_name = 4;
873
874 // The beginning of the window (0-based, inclusive) for which
875 // overlapping variants should be returned.
876 int64 start = 5;
877
878 // The end of the window (0-based, exclusive) for which overlapping
879 // variants should be returned.
880 int64 end = 6;
881 }
882
883 message StreamVariantsResponse {
884 repeated Variant variants = 1;
885 }
886
887 // Operations to be performed during import on Variant info fields.
888 // These operations are set for each info field in the info_merge_config
889 // map of ImportVariantsRequest, which is plumbed down to the
890 // MergeVariantRequests generated by the import job.
891 enum InfoMergeOperation {
892 INFO_MERGE_OPERATION_UNSPECIFIED = 0;
893
894 // By default, Variant info fields are persisted if the Variant doesn't
895 // already exist in the variantset. If the Variant is equivalent to a
896 // Variant already in the variantset, the incoming Variant's info field
897 // is ignored in favor of that of the already persisted Variant.
898 IGNORE_NEW = 1;
899
900 // This operation removes an info field from the incoming Variant
901 // and persists this info field in each of the incoming Variant's Calls.
902 MOVE_TO_CALLS = 2;
903 }