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