Struct google_genomics1::VariantMethods[][src]

pub struct VariantMethods<'a, C, A> where
    C: 'a,
    A: 'a, 
{ /* fields omitted */ }

A builder providing access to all methods supported on variant resources. It is not used directly, but through the Genomics hub.

Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate yup_oauth2 as oauth2;
extern crate google_genomics1 as genomics1;
 
use std::default::Default;
use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
use genomics1::Genomics;
 
let secret: ApplicationSecret = Default::default();
let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
                              hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
                              <MemoryStorage as Default>::default(), None);
let mut hub = Genomics::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `create(...)`, `delete(...)`, `get(...)`, `import(...)`, `merge(...)`, `patch(...)` and `search(...)`
// to build up your call.
let rb = hub.variants();

Methods

impl<'a, C, A> VariantMethods<'a, C, A>
[src]

Create a builder to help you perform the following task:

Gets a list of variants matching the criteria.

Implements GlobalAllianceApi.searchVariants.

Arguments

  • request - No description provided.

Create a builder to help you perform the following task:

Deletes a variant.

Arguments

  • variantId - The ID of the variant to be deleted.

Create a builder to help you perform the following task:

Gets a variant by ID.

Arguments

  • variantId - The ID of the variant.

Create a builder to help you perform the following task:

Merges the given variants with existing variants.

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.

Arguments

  • request - No description provided.

Create a builder to help you perform the following task:

Creates a new variant.

Arguments

  • request - No description provided.

Create a builder to help you perform the following task:

Creates variant data by asynchronously importing the provided information.

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.

Arguments

  • request - No description provided.

Create a builder to help you perform the following task:

Updates a variant.

This method supports patch semantics. Returns the modified variant without its calls.

Arguments

  • request - No description provided.
  • variantId - The ID of the variant to be updated.

Trait Implementations

impl<'a, C, A> MethodsBuilder for VariantMethods<'a, C, A>
[src]

Auto Trait Implementations

impl<'a, C, A> !Send for VariantMethods<'a, C, A>

impl<'a, C, A> !Sync for VariantMethods<'a, C, A>