# Genomics API . variants

## Instance Methods

Creates a new variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)

Deletes a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)

Gets a variant by ID. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)

Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and Variant info fields are merged as specified in infoMergeConfig. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set.

Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant. Variant info fields are merged as specified in the infoMergeConfig field of the MergeVariantsRequest. Please exercise caution when using this method! It is easy to introduce mistakes in existing variants and difficult to back out of them. For example, suppose you were trying to merge a new variant with an existing one and both variants contain calls that belong to callsets with the same callset ID. // Existing variant - irrelevant fields trimmed for clarity { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 0, 1 ], } ] } // New variant with conflicting call information { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } The resulting merged variant would overwrite the existing calls with those from the new variant: { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } This may be the desired outcome, but it is up to the user to determine if if that is indeed the case.

Updates a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. Returns the modified variant without its calls.

Gets a list of variants matching the criteria. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).

Returns a stream of all the variants matching the search request, ordered by reference name, position, and ID.

### Method Details

`create(body, x__xgafv=None)`

    Creates a new variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample.
      "info": { # A map of additional variant information. This must be of the form map (string key mapping to a list of string values).
        "a_key": [
          "",
        ],
      },
      "variantSetId": "A String", # The ID of the variant set this variant belongs to.
      "end": "A String", # The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions.
      "calls": [ # The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant.
        { # A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345.
          "info": { # A map of additional variant call information. This must be of the form map (string key mapping to a list of string values).
            "a_key": [
              "",
            ],
          },
          "genotype": [ # The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned.
            42,
          ],
          "callSetId": "A String", # The ID of the call set this variant call belongs to.
          "phaseset": "A String", # If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`.
          "genotypeLikelihood": [ # The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`.
            3.14,
          ],
          "callSetName": "A String", # The name of the call set this variant call belongs to.
        },
      ],
      "created": "A String", # The date this variant was created, in milliseconds from the epoch.
      "referenceBases": "A String", # The reference bases for this variant. They start at the given position.
      "filter": [ # A list of filters (normally quality filters) this variant has failed. `PASS` indicates this variant has passed all filters.
        "A String",
      ],
      "start": "A String", # The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases.
      "names": [ # Names for the variant, for example a RefSNP ID.
        "A String",
      ],
      "alternateBases": [ # The bases that appear instead of the reference bases.
        "A String",
      ],
      "referenceName": "A String", # The reference on which this variant occurs. (such as `chr20` or `X`)
      "quality": 3.14, # A measure of how likely this variant is to be real. A higher value is better.
      "id": "A String", # The server-generated variant ID, unique across all variants.
    }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample.
        "info": { # A map of additional variant information. This must be of the form map (string key mapping to a list of string values).
          "a_key": [
            "",
          ],
        },
        "variantSetId": "A String", # The ID of the variant set this variant belongs to.
        "end": "A String", # The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions.
        "calls": [ # The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant.
          { # A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345.
            "info": { # A map of additional variant call information. This must be of the form map (string key mapping to a list of string values).
              "a_key": [
                "",
              ],
            },
            "genotype": [ # The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned.
              42,
            ],
            "callSetId": "A String", # The ID of the call set this variant call belongs to.
            "phaseset": "A String", # If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`.
            "genotypeLikelihood": [ # The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`.
              3.14,
            ],
            "callSetName": "A String", # The name of the call set this variant call belongs to.
          },
        ],
        "created": "A String", # The date this variant was created, in milliseconds from the epoch.
        "referenceBases": "A String", # The reference bases for this variant. They start at the given position.
        "filter": [ # A list of filters (normally quality filters) this variant has failed. `PASS` indicates this variant has passed all filters.
          "A String",
        ],
        "start": "A String", # The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases.
        "names": [ # Names for the variant, for example a RefSNP ID.
          "A String",
        ],
        "alternateBases": [ # The bases that appear instead of the reference bases.
          "A String",
        ],
        "referenceName": "A String", # The reference on which this variant occurs. (such as `chr20` or `X`)
        "quality": 3.14, # A measure of how likely this variant is to be real. A higher value is better.
        "id": "A String", # The server-generated variant ID, unique across all variants.
      }

`delete(variantId, x__xgafv=None)`

    Deletes a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)

    Args:
      variantId: string, The ID of the variant to be deleted. (required)
      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
      }

`get(variantId, x__xgafv=None)`

    Gets a variant by ID. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)

    Args:
      variantId: string, The ID of the variant. (required)
      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample.
        "info": { # A map of additional variant information. This must be of the form map (string key mapping to a list of string values).
          "a_key": [
            "",
          ],
        },
        "variantSetId": "A String", # The ID of the variant set this variant belongs to.
        "end": "A String", # The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions.
        "calls": [ # The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant.
          { # A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345.
            "info": { # A map of additional variant call information. This must be of the form map (string key mapping to a list of string values).
              "a_key": [
                "",
              ],
            },
            "genotype": [ # The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned.
              42,
            ],
            "callSetId": "A String", # The ID of the call set this variant call belongs to.
            "phaseset": "A String", # If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`.
            "genotypeLikelihood": [ # The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`.
              3.14,
            ],
            "callSetName": "A String", # The name of the call set this variant call belongs to.
          },
        ],
        "created": "A String", # The date this variant was created, in milliseconds from the epoch.
        "referenceBases": "A String", # The reference bases for this variant. They start at the given position.
        "filter": [ # A list of filters (normally quality filters) this variant has failed. `PASS` indicates this variant has passed all filters.
          "A String",
        ],
        "start": "A String", # The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases.
        "names": [ # Names for the variant, for example a RefSNP ID.
          "A String",
        ],
        "alternateBases": [ # The bases that appear instead of the reference bases.
          "A String",
        ],
        "referenceName": "A String", # The reference on which this variant occurs. (such as `chr20` or `X`)
        "quality": 3.14, # A measure of how likely this variant is to be real. A higher value is better.
        "id": "A String", # The server-generated variant ID, unique across all variants.
      }

`import_(body, x__xgafv=None)`

    Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and Variant info fields are merged as specified in infoMergeConfig. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # The variant data import request.
        "variantSetId": "A String", # Required. The variant set to which variant data should be imported.
        "normalizeReferenceNames": True or False, # Convert reference names to the canonical representation. hg19 haploytypes (those reference names containing "_hap") are not modified in any way. All other reference names are modified according to the following rules: The reference name is capitalized. The "chr" prefix is dropped for all autosomes and sex chromsomes. For example "chr17" becomes "17" and "chrX" becomes "X". All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT".
        "sourceUris": [ # A list of URIs referencing variant files in Google Cloud Storage. URIs can include wildcards [as described here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). Note that recursive wildcards ('**') are not supported.
          "A String",
        ],
        "infoMergeConfig": { # A mapping between info field keys and the InfoMergeOperations to be performed on them. This is plumbed down to the MergeVariantRequests generated by the resulting import job.
          "a_key": "A String",
        },
        "format": "A String", # The format of the variant data being imported. If unspecified, defaults to to `VCF`.
      }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # This resource represents a long-running operation that is the result of a network API call.
        "response": { # If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If importing Variants, an ImportVariantsResponse is returned. For exports, an empty response is returned.
          "a_key": "", # Properties of the object. Contains field @type with type URL.
        },
        "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons. # The error result of the operation in case of failure or cancellation.
          "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
          "code": 42, # The status code, which should be an enum value of google.rpc.Code.
          "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
            {
              "a_key": "", # Properties of the object. Contains field @type with type URL.
            },
          ],
        },
        "done": True or False, # If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available.
        "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`
        "metadata": { # An OperationMetadata object. This will always be returned with the Operation.
          "a_key": "", # Properties of the object. Contains field @type with type URL.
        },
      }

`merge(body, x__xgafv=None)`

    Merges the given variants with existing variants. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each variant will be merged with an existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant. Variant info fields are merged as specified in the infoMergeConfig field of the MergeVariantsRequest. Please exercise caution when using this method! It is easy to introduce mistakes in existing variants and difficult to back out of them. For example, suppose you were trying to merge a new variant with an existing one and both variants contain calls that belong to callsets with the same callset ID. // Existing variant - irrelevant fields trimmed for clarity { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 0, 1 ], } ] } // New variant with conflicting call information { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } The resulting merged variant would overwrite the existing calls with those from the new variant: { "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ { "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], } ] } This may be the desired outcome, but it is up to the user to determine if if that is indeed the case.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    {
        "variantSetId": "A String", # The destination variant set.
        "variants": [ # The variants to be merged with existing variants.
          { # A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample.
            "info": { # A map of additional variant information. This must be of the form map (string key mapping to a list of string values).
              "a_key": [
                "",
              ],
            },
            "variantSetId": "A String", # The ID of the variant set this variant belongs to.
            "end": "A String", # The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions.
            "calls": [ # The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant.
              { # A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345.
                "info": { # A map of additional variant call information. This must be of the form map (string key mapping to a list of string values).
                  "a_key": [
                    "",
                  ],
                },
                "genotype": [ # The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned.
                  42,
                ],
                "callSetId": "A String", # The ID of the call set this variant call belongs to.
                "phaseset": "A String", # If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`.
                "genotypeLikelihood": [ # The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`.
                  3.14,
                ],
                "callSetName": "A String", # The name of the call set this variant call belongs to.
              },
            ],
            "created": "A String", # The date this variant was created, in milliseconds from the epoch.
            "referenceBases": "A String", # The reference bases for this variant. They start at the given position.
            "filter": [ # A list of filters (normally quality filters) this variant has failed. `PASS` indicates this variant has passed all filters.
              "A String",
            ],
            "start": "A String", # The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases.
            "names": [ # Names for the variant, for example a RefSNP ID.
              "A String",
            ],
            "alternateBases": [ # The bases that appear instead of the reference bases.
              "A String",
            ],
            "referenceName": "A String", # The reference on which this variant occurs. (such as `chr20` or `X`)
            "quality": 3.14, # A measure of how likely this variant is to be real. A higher value is better.
            "id": "A String", # The server-generated variant ID, unique across all variants.
          },
        ],
        "infoMergeConfig": { # A mapping between info field keys and the InfoMergeOperations to be performed on them.
          "a_key": "A String",
        },
      }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
      }

`patch(variantId, body, x__xgafv=None, updateMask=None)`

    Updates a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. Returns the modified variant without its calls.

    Args:
      variantId: string, The ID of the variant to be updated. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample.
      "info": { # A map of additional variant information. This must be of the form map (string key mapping to a list of string values).
        "a_key": [
          "",
        ],
      },
      "variantSetId": "A String", # The ID of the variant set this variant belongs to.
      "end": "A String", # The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions.
      "calls": [ # The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant.
        { # A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345.
          "info": { # A map of additional variant call information. This must be of the form map (string key mapping to a list of string values).
            "a_key": [
              "",
            ],
          },
          "genotype": [ # The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned.
            42,
          ],
          "callSetId": "A String", # The ID of the call set this variant call belongs to.
          "phaseset": "A String", # If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`.
          "genotypeLikelihood": [ # The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`.
            3.14,
          ],
          "callSetName": "A String", # The name of the call set this variant call belongs to.
        },
      ],
      "created": "A String", # The date this variant was created, in milliseconds from the epoch.
      "referenceBases": "A String", # The reference bases for this variant. They start at the given position.
      "filter": [ # A list of filters (normally quality filters) this variant has failed. `PASS` indicates this variant has passed all filters.
        "A String",
      ],
      "start": "A String", # The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases.
      "names": [ # Names for the variant, for example a RefSNP ID.
        "A String",
      ],
      "alternateBases": [ # The bases that appear instead of the reference bases.
        "A String",
      ],
      "referenceName": "A String", # The reference on which this variant occurs. (such as `chr20` or `X`)
      "quality": 3.14, # A measure of how likely this variant is to be real. A higher value is better.
      "id": "A String", # The server-generated variant ID, unique across all variants.
    }

      x__xgafv: string, V1 error format.
      updateMask: string, An optional mask specifying which fields to update. At this time, mutable fields are names and info. Acceptable values are "names" and "info". If unspecified, all mutable fields will be updated.

    Returns:
      An object of the form:

        { # A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample.
        "info": { # A map of additional variant information. This must be of the form map (string key mapping to a list of string values).
          "a_key": [
            "",
          ],
        },
        "variantSetId": "A String", # The ID of the variant set this variant belongs to.
        "end": "A String", # The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions.
        "calls": [ # The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant.
          { # A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345.
            "info": { # A map of additional variant call information. This must be of the form map (string key mapping to a list of string values).
              "a_key": [
                "",
              ],
            },
            "genotype": [ # The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned.
              42,
            ],
            "callSetId": "A String", # The ID of the call set this variant call belongs to.
            "phaseset": "A String", # If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`.
            "genotypeLikelihood": [ # The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`.
              3.14,
            ],
            "callSetName": "A String", # The name of the call set this variant call belongs to.
          },
        ],
        "created": "A String", # The date this variant was created, in milliseconds from the epoch.
        "referenceBases": "A String", # The reference bases for this variant. They start at the given position.
        "filter": [ # A list of filters (normally quality filters) this variant has failed. `PASS` indicates this variant has passed all filters.
          "A String",
        ],
        "start": "A String", # The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases.
        "names": [ # Names for the variant, for example a RefSNP ID.
          "A String",
        ],
        "alternateBases": [ # The bases that appear instead of the reference bases.
          "A String",
        ],
        "referenceName": "A String", # The reference on which this variant occurs. (such as `chr20` or `X`)
        "quality": 3.14, # A measure of how likely this variant is to be real. A higher value is better.
        "id": "A String", # The server-generated variant ID, unique across all variants.
      }

`search(body, x__xgafv=None)`

    Gets a list of variants matching the criteria. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # The variant search request.
        "end": "A String", # The end of the window, 0-based exclusive. If unspecified or 0, defaults to the length of the reference.
        "pageSize": 42, # The maximum number of variants to return in a single page. If unspecified, defaults to 5000. The maximum value is 10000.
        "pageToken": "A String", # 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.
        "maxCalls": 42, # The maximum number of calls to return in a single page. Note that this limit may be exceeded in the event that a matching variant contains more calls than the requested maximum. If unspecified, defaults to 5000. The maximum value is 10000.
        "start": "A String", # The beginning of the window (0-based, inclusive) for which overlapping variants should be returned. If unspecified, defaults to 0.
        "callSetIds": [ # Only return variant calls which belong to call sets with these ids. Leaving this blank returns all variant calls. If a variant has no calls belonging to any of these call sets, it won't be returned at all.
          "A String",
        ],
        "variantName": "A String", # Only return variants which have exactly this name.
        "referenceName": "A String", # Required. Only return variants in this reference sequence.
        "variantSetIds": [ # At most one variant set ID must be provided. Only variants from this variant set will be returned. If omitted, a call set id must be included in the request.
          "A String",
        ],
      }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        { # The variant search response.
        "nextPageToken": "A String", # 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.
        "variants": [ # The list of matching Variants.
          { # A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample.
            "info": { # A map of additional variant information. This must be of the form map (string key mapping to a list of string values).
              "a_key": [
                "",
              ],
            },
            "variantSetId": "A String", # The ID of the variant set this variant belongs to.
            "end": "A String", # The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions.
            "calls": [ # The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant.
              { # A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345.
                "info": { # A map of additional variant call information. This must be of the form map (string key mapping to a list of string values).
                  "a_key": [
                    "",
                  ],
                },
                "genotype": [ # The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned.
                  42,
                ],
                "callSetId": "A String", # The ID of the call set this variant call belongs to.
                "phaseset": "A String", # If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`.
                "genotypeLikelihood": [ # The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`.
                  3.14,
                ],
                "callSetName": "A String", # The name of the call set this variant call belongs to.
              },
            ],
            "created": "A String", # The date this variant was created, in milliseconds from the epoch.
            "referenceBases": "A String", # The reference bases for this variant. They start at the given position.
            "filter": [ # A list of filters (normally quality filters) this variant has failed. `PASS` indicates this variant has passed all filters.
              "A String",
            ],
            "start": "A String", # The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases.
            "names": [ # Names for the variant, for example a RefSNP ID.
              "A String",
            ],
            "alternateBases": [ # The bases that appear instead of the reference bases.
              "A String",
            ],
            "referenceName": "A String", # The reference on which this variant occurs. (such as `chr20` or `X`)
            "quality": 3.14, # A measure of how likely this variant is to be real. A higher value is better.
            "id": "A String", # The server-generated variant ID, unique across all variants.
          },
        ],
      }

`stream(body, x__xgafv=None)`

    Returns a stream of all the variants matching the search request, ordered by reference name, position, and ID.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # The stream variants request.
        "variantSetId": "A String", # The variant set ID from which to stream variants.
        "end": "A String", # The end of the window (0-based, exclusive) for which overlapping variants should be returned.
        "projectId": "A String", # The Google Cloud project ID which will be billed for this access. The caller must have WRITE access to this project. Required.
        "start": "A String", # The beginning of the window (0-based, inclusive) for which overlapping variants should be returned.
        "callSetIds": [ # Only return variant calls which belong to call sets with these IDs. Leaving this blank returns all variant calls.
          "A String",
        ],
        "referenceName": "A String", # Required. Only return variants in this reference sequence.
      }

      x__xgafv: string, V1 error format.

    Returns:
      An object of the form:

        {
        "variants": [
          { # A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample.
            "info": { # A map of additional variant information. This must be of the form map (string key mapping to a list of string values).
              "a_key": [
                "",
              ],
            },
            "variantSetId": "A String", # The ID of the variant set this variant belongs to.
            "end": "A String", # The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions.
            "calls": [ # The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant.
              { # A call represents the determination of genotype with respect to a particular variant. It may include associated information such as quality and phasing. For example, a call might assign a probability of 0.32 to the occurrence of a SNP named rs1234 in a call set with the name NA12345.
                "info": { # A map of additional variant call information. This must be of the form map (string key mapping to a list of string values).
                  "a_key": [
                    "",
                  ],
                },
                "genotype": [ # The genotype of this variant call. Each value represents either the value of the `referenceBases` field or a 1-based index into `alternateBases`. If a variant had a `referenceBases` value of `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call represented the heterozygous value `CA` for this variant. If the `genotype` was instead `[0, 1]`, the represented value would be `TA`. Ordering of the genotype values is important if the `phaseset` is present. If a genotype is not called (that is, a `.` is present in the GT string) -1 is returned.
                  42,
                ],
                "callSetId": "A String", # The ID of the call set this variant call belongs to.
                "phaseset": "A String", # If this field is present, this variant call's genotype ordering implies the phase of the bases and is consistent with any other variant calls in the same reference sequence which have the same phaseset value. When importing data from VCF, if the genotype data was phased but no phase set was specified this field will be set to `*`.
                "genotypeLikelihood": [ # The genotype likelihoods for this variant call. Each array entry represents how likely a specific genotype is for this call. The value ordering is defined by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) are available and log10(P) genotype likelihood scores (GL) are not, PL scores are converted to GL scores. If both are available, PL scores are stored in `info`.
                  3.14,
                ],
                "callSetName": "A String", # The name of the call set this variant call belongs to.
              },
            ],
            "created": "A String", # The date this variant was created, in milliseconds from the epoch.
            "referenceBases": "A String", # The reference bases for this variant. They start at the given position.
            "filter": [ # A list of filters (normally quality filters) this variant has failed. `PASS` indicates this variant has passed all filters.
              "A String",
            ],
            "start": "A String", # The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases.
            "names": [ # Names for the variant, for example a RefSNP ID.
              "A String",
            ],
            "alternateBases": [ # The bases that appear instead of the reference bases.
              "A String",
            ],
            "referenceName": "A String", # The reference on which this variant occurs. (such as `chr20` or `X`)
            "quality": 3.14, # A measure of how likely this variant is to be real. A higher value is better.
            "id": "A String", # The server-generated variant ID, unique across all variants.
          },
        ],
      }