pub struct VariantServiceV1Client<T> { /* private fields */ }

Implementations§

source§

impl<T> VariantServiceV1Client<T>
where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

source

pub fn new(inner: T) -> Self

source

pub fn with_origin(inner: T, origin: Uri) -> Self

source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> VariantServiceV1Client<InterceptedService<T, F>>
where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,

source

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

source

pub async fn import_variants( &mut self, request: impl IntoRequest<ImportVariantsRequest>, ) -> Result<Response<Operation>, Status>

Creates variant data by asynchronously importing the provided information.

For the definitions of variant sets and other genomics resources, see 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][google.genomics.v1.ImportVariantsRequest.info_merge_config]. 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.

source

pub async fn create_variant_set( &mut self, request: impl IntoRequest<CreateVariantSetRequest>, ) -> Result<Response<VariantSet>, Status>

Creates a new variant set.

For the definitions of variant sets and other genomics resources, see Fundamentals of Google Genomics

The provided variant set must have a valid datasetId set - all other fields are optional. Note that the id field will be ignored, as this is assigned by the server.

source

pub async fn export_variant_set( &mut self, request: impl IntoRequest<ExportVariantSetRequest>, ) -> Result<Response<Operation>, Status>

Exports variant set data to an external destination.

For the definitions of variant sets and other genomics resources, see Fundamentals of Google Genomics

source

pub async fn get_variant_set( &mut self, request: impl IntoRequest<GetVariantSetRequest>, ) -> Result<Response<VariantSet>, Status>

Gets a variant set by ID.

For the definitions of variant sets and other genomics resources, see Fundamentals of Google Genomics

source

pub async fn search_variant_sets( &mut self, request: impl IntoRequest<SearchVariantSetsRequest>, ) -> Result<Response<SearchVariantSetsResponse>, Status>

Returns a list of all variant sets matching search criteria.

For the definitions of variant sets and other genomics resources, see Fundamentals of Google Genomics

Implements GlobalAllianceApi.searchVariantSets.

source

pub async fn delete_variant_set( &mut self, request: impl IntoRequest<DeleteVariantSetRequest>, ) -> Result<Response<()>, Status>

Deletes a variant set including all variants, call sets, and calls within. This is not reversible.

For the definitions of variant sets and other genomics resources, see Fundamentals of Google Genomics

source

pub async fn update_variant_set( &mut self, request: impl IntoRequest<UpdateVariantSetRequest>, ) -> Result<Response<VariantSet>, Status>

Updates a variant set using patch semantics.

For the definitions of variant sets and other genomics resources, see Fundamentals of Google Genomics

source

pub async fn search_variants( &mut self, request: impl IntoRequest<SearchVariantsRequest>, ) -> Result<Response<SearchVariantsResponse>, Status>

Gets a list of variants matching the criteria.

For the definitions of variants and other genomics resources, see Fundamentals of Google Genomics

Implements GlobalAllianceApi.searchVariants.

source

pub async fn create_variant( &mut self, request: impl IntoRequest<CreateVariantRequest>, ) -> Result<Response<Variant>, Status>

Creates a new variant.

For the definitions of variants and other genomics resources, see Fundamentals of Google Genomics

source

pub async fn update_variant( &mut self, request: impl IntoRequest<UpdateVariantRequest>, ) -> Result<Response<Variant>, Status>

Updates a variant.

For the definitions of variants and other genomics resources, see Fundamentals of Google Genomics

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

source

pub async fn delete_variant( &mut self, request: impl IntoRequest<DeleteVariantRequest>, ) -> Result<Response<()>, Status>

Deletes a variant.

For the definitions of variants and other genomics resources, see Fundamentals of Google Genomics

source

pub async fn get_variant( &mut self, request: impl IntoRequest<GetVariantRequest>, ) -> Result<Response<Variant>, Status>

Gets a variant by ID.

For the definitions of variants and other genomics resources, see Fundamentals of Google Genomics

source

pub async fn merge_variants( &mut self, request: impl IntoRequest<MergeVariantsRequest>, ) -> Result<Response<()>, Status>

Merges the given variants with existing variants.

For the definitions of variants and other genomics resources, see 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][google.genomics.v1.MergeVariantsRequest.info_merge_config] 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.

source

pub async fn search_call_sets( &mut self, request: impl IntoRequest<SearchCallSetsRequest>, ) -> Result<Response<SearchCallSetsResponse>, Status>

Gets a list of call sets matching the criteria.

For the definitions of call sets and other genomics resources, see Fundamentals of Google Genomics

Implements GlobalAllianceApi.searchCallSets.

source

pub async fn create_call_set( &mut self, request: impl IntoRequest<CreateCallSetRequest>, ) -> Result<Response<CallSet>, Status>

Creates a new call set.

For the definitions of call sets and other genomics resources, see Fundamentals of Google Genomics

source

pub async fn update_call_set( &mut self, request: impl IntoRequest<UpdateCallSetRequest>, ) -> Result<Response<CallSet>, Status>

Updates a call set.

For the definitions of call sets and other genomics resources, see Fundamentals of Google Genomics

This method supports patch semantics.

source

pub async fn delete_call_set( &mut self, request: impl IntoRequest<DeleteCallSetRequest>, ) -> Result<Response<()>, Status>

Deletes a call set.

For the definitions of call sets and other genomics resources, see Fundamentals of Google Genomics

source

pub async fn get_call_set( &mut self, request: impl IntoRequest<GetCallSetRequest>, ) -> Result<Response<CallSet>, Status>

Gets a call set by ID.

For the definitions of call sets and other genomics resources, see Fundamentals of Google Genomics

Trait Implementations§

source§

impl<T: Clone> Clone for VariantServiceV1Client<T>

source§

fn clone(&self) -> VariantServiceV1Client<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for VariantServiceV1Client<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more