Current section
Files
Jump to
Current section
Files
lib/google_api/genomics/v1/api/readgroupsets.ex
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule GoogleApi.Genomics.V1.Api.Readgroupsets do
@moduledoc """
API calls for all endpoints tagged `Readgroupsets`.
"""
alias GoogleApi.Genomics.V1.Connection
import GoogleApi.Genomics.V1.RequestBuilder
@doc """
Lists fixed width coverage buckets for a read group set, each of which correspond to a range of a reference sequence. Each bucket summarizes coverage information across its corresponding genomic range. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Coverage is defined as the number of reads which are aligned to a given base in the reference sequence. Coverage buckets are available at several precomputed bucket widths, enabling retrieval of various coverage 'zoom levels'. The caller must have READ permissions for the target read group set.
## Parameters
- connection (GoogleApi.Genomics.V1.Connection): Connection to server
- read_group_set_id (String): Required. The ID of the read group set over which coverage is requested.
- opts (KeywordList): [optional] Optional parameters
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :__/xgafv (String): V1 error format.
- :callback (String): JSONP
- :alt (String): Data format for response.
- :access_token (String): OAuth access token.
- :key (String): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :pp (Boolean): Pretty-print response.
- :bearer_token (String): OAuth bearer token.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :end (String): The end position of the range on the reference, 0-based exclusive. If specified, `referenceName` must also be specified. If unset or 0, defaults to the length of the reference.
- :page_token (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.
- :page_size (Integer): The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 2048.
- :start (String): The start position of the range on the reference, 0-based inclusive. If specified, `referenceName` must also be specified. Defaults to 0.
- :target_bucket_width (String): The desired width of each reported coverage bucket in base pairs. This will be rounded down to the nearest precomputed bucket width; the value of which is returned as `bucketWidth` in the response. Defaults to infinity (each bucket spans an entire reference sequence) or the length of the target range, if specified. The smallest precomputed `bucketWidth` is currently 2048 base pairs; this is subject to change.
- :reference_name (String): The name of the reference to query, within the reference set associated with this query. Optional.
## Returns
{:ok, %GoogleApi.Genomics.V1.Model.ListCoverageBucketsResponse{}} on success
{:error, info} on failure
"""
@spec genomics_readgroupsets_coveragebuckets_list(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Genomics.V1.Model.ListCoverageBucketsResponse.t} | {:error, Tesla.Env.t}
def genomics_readgroupsets_coveragebuckets_list(connection, read_group_set_id, opts \\ []) do
optional_params = %{
:"fields" => :query,
:"uploadType" => :query,
:"$.xgafv" => :query,
:"callback" => :query,
:"alt" => :query,
:"access_token" => :query,
:"key" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"bearer_token" => :query,
:"oauth_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"end" => :query,
:"pageToken" => :query,
:"pageSize" => :query,
:"start" => :query,
:"targetBucketWidth" => :query,
:"referenceName" => :query
}
%{}
|> method(:get)
|> url("/v1/readgroupsets/{readGroupSetId}/coveragebuckets", %{
"readGroupSetId" => URI.encode_www_form(read_group_set_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Genomics.V1.Model.ListCoverageBucketsResponse{})
end
@doc """
Deletes a read group set. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
## Parameters
- connection (GoogleApi.Genomics.V1.Connection): Connection to server
- read_group_set_id (String): The ID of the read group set to be deleted. The caller must have WRITE permissions to the dataset associated with this read group set.
- opts (KeywordList): [optional] Optional parameters
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :__/xgafv (String): V1 error format.
- :callback (String): JSONP
- :alt (String): Data format for response.
- :access_token (String): OAuth access token.
- :key (String): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :pp (Boolean): Pretty-print response.
- :bearer_token (String): OAuth bearer token.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
## Returns
{:ok, %GoogleApi.Genomics.V1.Model.Empty{}} on success
{:error, info} on failure
"""
@spec genomics_readgroupsets_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Genomics.V1.Model.Empty.t} | {:error, Tesla.Env.t}
def genomics_readgroupsets_delete(connection, read_group_set_id, opts \\ []) do
optional_params = %{
:"fields" => :query,
:"uploadType" => :query,
:"$.xgafv" => :query,
:"callback" => :query,
:"alt" => :query,
:"access_token" => :query,
:"key" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"bearer_token" => :query,
:"oauth_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query
}
%{}
|> method(:delete)
|> url("/v1/readgroupsets/{readGroupSetId}", %{
"readGroupSetId" => URI.encode_www_form(read_group_set_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Genomics.V1.Model.Empty{})
end
@doc """
Exports a read group set to a BAM file in Google Cloud Storage. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Note that currently there may be some differences between exported BAM files and the original BAM file at the time of import. See ImportReadGroupSets for caveats.
## Parameters
- connection (GoogleApi.Genomics.V1.Connection): Connection to server
- read_group_set_id (String): Required. The ID of the read group set to export. The caller must have READ access to this read group set.
- opts (KeywordList): [optional] Optional parameters
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :__/xgafv (String): V1 error format.
- :callback (String): JSONP
- :alt (String): Data format for response.
- :access_token (String): OAuth access token.
- :key (String): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :pp (Boolean): Pretty-print response.
- :bearer_token (String): OAuth bearer token.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :body (ExportReadGroupSetRequest):
## Returns
{:ok, %GoogleApi.Genomics.V1.Model.Operation{}} on success
{:error, info} on failure
"""
@spec genomics_readgroupsets_export(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Genomics.V1.Model.Operation.t} | {:error, Tesla.Env.t}
def genomics_readgroupsets_export(connection, read_group_set_id, opts \\ []) do
optional_params = %{
:"fields" => :query,
:"uploadType" => :query,
:"$.xgafv" => :query,
:"callback" => :query,
:"alt" => :query,
:"access_token" => :query,
:"key" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"bearer_token" => :query,
:"oauth_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1/readgroupsets/{readGroupSetId}:export", %{
"readGroupSetId" => URI.encode_www_form(read_group_set_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Genomics.V1.Model.Operation{})
end
@doc """
Gets a read group set by ID. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
## Parameters
- connection (GoogleApi.Genomics.V1.Connection): Connection to server
- read_group_set_id (String): The ID of the read group set.
- opts (KeywordList): [optional] Optional parameters
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :__/xgafv (String): V1 error format.
- :callback (String): JSONP
- :alt (String): Data format for response.
- :access_token (String): OAuth access token.
- :key (String): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :pp (Boolean): Pretty-print response.
- :bearer_token (String): OAuth bearer token.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
## Returns
{:ok, %GoogleApi.Genomics.V1.Model.ReadGroupSet{}} on success
{:error, info} on failure
"""
@spec genomics_readgroupsets_get(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Genomics.V1.Model.ReadGroupSet.t} | {:error, Tesla.Env.t}
def genomics_readgroupsets_get(connection, read_group_set_id, opts \\ []) do
optional_params = %{
:"fields" => :query,
:"uploadType" => :query,
:"$.xgafv" => :query,
:"callback" => :query,
:"alt" => :query,
:"access_token" => :query,
:"key" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"bearer_token" => :query,
:"oauth_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query
}
%{}
|> method(:get)
|> url("/v1/readgroupsets/{readGroupSetId}", %{
"readGroupSetId" => URI.encode_www_form(read_group_set_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Genomics.V1.Model.ReadGroupSet{})
end
@doc """
Creates read group sets by asynchronously importing the provided information. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The caller must have WRITE permissions to the dataset. ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import - Tags will be converted to strings - tag types are not preserved - Comments (`@CO`) in the input file header will not be preserved - Original header order of references (`@SQ`) will not be preserved - Any reverse stranded unmapped reads will be reverse complemented, and their qualities (also the \"BQ\" and \"OQ\" tags, if any) will be reversed - Unmapped reads will be stripped of positional information (reference name and position)
## Parameters
- connection (GoogleApi.Genomics.V1.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :__/xgafv (String): V1 error format.
- :callback (String): JSONP
- :alt (String): Data format for response.
- :access_token (String): OAuth access token.
- :key (String): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :pp (Boolean): Pretty-print response.
- :bearer_token (String): OAuth bearer token.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :body (ImportReadGroupSetsRequest):
## Returns
{:ok, %GoogleApi.Genomics.V1.Model.Operation{}} on success
{:error, info} on failure
"""
@spec genomics_readgroupsets_import(Tesla.Env.client, keyword()) :: {:ok, GoogleApi.Genomics.V1.Model.Operation.t} | {:error, Tesla.Env.t}
def genomics_readgroupsets_import(connection, opts \\ []) do
optional_params = %{
:"fields" => :query,
:"uploadType" => :query,
:"$.xgafv" => :query,
:"callback" => :query,
:"alt" => :query,
:"access_token" => :query,
:"key" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"bearer_token" => :query,
:"oauth_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1/readgroupsets:import")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Genomics.V1.Model.Operation{})
end
@doc """
Updates a read group set. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics.
## Parameters
- connection (GoogleApi.Genomics.V1.Connection): Connection to server
- read_group_set_id (String): The ID of the read group set to be updated. The caller must have WRITE permissions to the dataset associated with this read group set.
- opts (KeywordList): [optional] Optional parameters
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :__/xgafv (String): V1 error format.
- :callback (String): JSONP
- :alt (String): Data format for response.
- :access_token (String): OAuth access token.
- :key (String): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :pp (Boolean): Pretty-print response.
- :bearer_token (String): OAuth bearer token.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :update_mask (String): An optional mask specifying which fields to update. Supported fields: * name. * referenceSetId. Leaving `updateMask` unset is equivalent to specifying all mutable fields.
- :body (ReadGroupSet):
## Returns
{:ok, %GoogleApi.Genomics.V1.Model.ReadGroupSet{}} on success
{:error, info} on failure
"""
@spec genomics_readgroupsets_patch(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Genomics.V1.Model.ReadGroupSet.t} | {:error, Tesla.Env.t}
def genomics_readgroupsets_patch(connection, read_group_set_id, opts \\ []) do
optional_params = %{
:"fields" => :query,
:"uploadType" => :query,
:"$.xgafv" => :query,
:"callback" => :query,
:"alt" => :query,
:"access_token" => :query,
:"key" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"bearer_token" => :query,
:"oauth_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"updateMask" => :query,
:"body" => :body
}
%{}
|> method(:patch)
|> url("/v1/readgroupsets/{readGroupSetId}", %{
"readGroupSetId" => URI.encode_www_form(read_group_set_id)
})
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Genomics.V1.Model.ReadGroupSet{})
end
@doc """
Searches for read group sets matching the criteria. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135).
## Parameters
- connection (GoogleApi.Genomics.V1.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :fields (String): Selector specifying which fields to include in a partial response.
- :upload_type (String): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :__/xgafv (String): V1 error format.
- :callback (String): JSONP
- :alt (String): Data format for response.
- :access_token (String): OAuth access token.
- :key (String): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- :pp (Boolean): Pretty-print response.
- :bearer_token (String): OAuth bearer token.
- :oauth_token (String): OAuth 2.0 token for the current user.
- :upload_protocol (String): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :pretty_print (Boolean): Returns response with indentations and line breaks.
- :body (SearchReadGroupSetsRequest):
## Returns
{:ok, %GoogleApi.Genomics.V1.Model.SearchReadGroupSetsResponse{}} on success
{:error, info} on failure
"""
@spec genomics_readgroupsets_search(Tesla.Env.client, keyword()) :: {:ok, GoogleApi.Genomics.V1.Model.SearchReadGroupSetsResponse.t} | {:error, Tesla.Env.t}
def genomics_readgroupsets_search(connection, opts \\ []) do
optional_params = %{
:"fields" => :query,
:"uploadType" => :query,
:"$.xgafv" => :query,
:"callback" => :query,
:"alt" => :query,
:"access_token" => :query,
:"key" => :query,
:"quotaUser" => :query,
:"pp" => :query,
:"bearer_token" => :query,
:"oauth_token" => :query,
:"upload_protocol" => :query,
:"prettyPrint" => :query,
:"body" => :body
}
%{}
|> method(:post)
|> url("/v1/readgroupsets/search")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%GoogleApi.Genomics.V1.Model.SearchReadGroupSetsResponse{})
end
end