Module: ncbi.datasets.openapi.api.prokaryote_api

NCBI Datasets API

Module: ncbi.datasets.openapi.api.prokaryote_api

NCBI Datasets API

### NCBI Datasets is a resource that lets you easily gather data from NCBI. The Datasets version 1 API is considred stable and will not be subject to breaking changes. However, certain endpoints will be [deprecated](https://www.ncbi.nlm.nih.gov/datasets/docs/v1/reference-docs/rest-api/deprecated_apis/), and then sunset as newer versions are published. For some larger downloads, you may want to download a [dehydrated zip archive](https://www.ncbi.nlm.nih.gov/datasets/docs/v1/how-tos/genomes/large-download/), and retrieve the individual data files at a later time. # noqa: E501

The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech

class ncbi.datasets.openapi.api.prokaryote_api.ProkaryoteApi(api_client=None)

Bases: object

NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech

Do not edit the class manually.

download_prokaryote_gene_package(accessions, **kwargs)

Get a prokaryote gene dataset by RefSeq protein accession # noqa: E501

Get a prokaryote gene dataset including gene and protein fasta sequence, annotation and metadata by prokaryote protein accession. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.download_prokaryote_gene_package(accessions, async_req=True)
>>> result = thread.get()
Parameters

accessions ([str]) – WP prokaryote protein accession

Keyword Arguments
  • include_annotation_type ([V1Fasta]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.. [optional]

  • gene_flank_config_length (int) – [optional]

  • taxon (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank When specified, return data from this taxon and its subtree. [optional]

  • filename (str) – Output file name.. [optional] if omitted the server will use the default value of “ncbi_dataset.zip”

  • _return_http_data_only (bool) – response data without head status code and headers. Default is True.

  • _preload_content (bool) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout (int/float/tuple) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None.

  • _check_input_type (bool) – specifies if type checking should be done one the data sent to the server. Default is True.

  • _check_return_type (bool) – specifies if type checking should be done one the data received from the server. Default is True.

  • _host_index (int/None) – specifies the index of the server that we want to use. Default is read from the configuration.

  • async_req (bool) – execute request asynchronously

Returns

file_type

If the method is called asynchronously, returns the request thread.

download_prokaryote_gene_package_post(v1_prokaryote_gene_request, **kwargs)

Get a prokaryote gene dataset by RefSeq protein accession by POST # noqa: E501

Get a prokaryote gene dataset including gene and protein fasta sequence, annotation and metadata by prokaryote protein accession by POST. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.download_prokaryote_gene_package_post(v1_prokaryote_gene_request, async_req=True)
>>> result = thread.get()
Parameters

v1_prokaryote_gene_request (V1ProkaryoteGeneRequest) –

Keyword Arguments
  • filename (str) – Output file name.. [optional] if omitted the server will use the default value of “ncbi_dataset.zip”

  • _return_http_data_only (bool) – response data without head status code and headers. Default is True.

  • _preload_content (bool) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout (int/float/tuple) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None.

  • _check_input_type (bool) – specifies if type checking should be done one the data sent to the server. Default is True.

  • _check_return_type (bool) – specifies if type checking should be done one the data received from the server. Default is True.

  • _host_index (int/None) – specifies the index of the server that we want to use. Default is read from the configuration.

  • async_req (bool) – execute request asynchronously

Returns

file_type

If the method is called asynchronously, returns the request thread.

Generated May 3, 2024