Module: ncbi.datasets.openapi.api.taxonomy_api
NCBI Datasets API
Module: ncbi.datasets.openapi.api.taxonomy_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.taxonomy_api.TaxonomyApi(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.
- tax_name_query(taxon_query, **kwargs)
Get a list of taxonomy names and IDs given a partial taxonomic name # noqa: E501
This endpoint retrieves a list of taxonomy names and IDs given a partial taxonomic name of any rank. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.tax_name_query(taxon_query, async_req=True) >>> result = thread.get()
- Parameters
taxon_query (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank
- Keyword Arguments
tax_rank_filter (V1OrganismQueryRequestTaxRankFilter) – Set the scope of searched tax ranks. [optional]
tax_resource_filter (V1OrganismQueryRequestTaxonResourceFilter) – [optional]
_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
- V1SciNameAndIds
If the method is called asynchronously, returns the request thread.
- taxonomy_filtered_subtree(taxons, **kwargs)
Use taxonomic identifiers to get a filtered taxonomic subtree # noqa: E501
Using NCBI Taxonomy IDs or names (common or scientific) at any rank, get a filtered taxonomic subtree that includes the full parent lineage and all immediate children from the selected taxonomic ranks in JSON format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.taxonomy_filtered_subtree(taxons, async_req=True) >>> result = thread.get()
- Parameters
taxons ([str]) –
- Keyword Arguments
specified_limit (bool) – Limit to specified species. [optional]
rank_limits ([V1OrganismRankType]) – Limit to the provided ranks. If empty, accept any rank.. [optional]
_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
- V1TaxonomyFilteredSubtreeResponse
If the method is called asynchronously, returns the request thread.
- taxonomy_filtered_subtree_post(v1_taxonomy_filtered_subtree_request, **kwargs)
Use taxonomic identifiers to get a filtered taxonomic subtree by post # noqa: E501
Using NCBI Taxonomy IDs or names (common or scientific) at any rank, get a filtered taxonomic subtree that includes the full parent lineage and all immediate children from the selected taxonomic ranks in JSON format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.taxonomy_filtered_subtree_post(v1_taxonomy_filtered_subtree_request, async_req=True) >>> result = thread.get()
- Parameters
v1_taxonomy_filtered_subtree_request (V1TaxonomyFilteredSubtreeRequest) –
- Keyword Arguments
_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
- V1TaxonomyFilteredSubtreeResponse
If the method is called asynchronously, returns the request thread.
- taxonomy_metadata(taxons, **kwargs)
Use taxonomic identifiers to get taxonomic metadata # noqa: E501
Using NCBI Taxonomy IDs or names (common or scientific) at any rank, get metadata about a taxonomic node including taxonomic identifiers, lineage information, child nodes, and gene and genome counts in JSON format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.taxonomy_metadata(taxons, async_req=True) >>> result = thread.get()
- Parameters
taxons ([str]) –
- Keyword Arguments
returned_content (V1TaxonomyMetadataRequestContentType) – Return either tax-ids alone, or entire taxononmy-metadata records. [optional]
_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
- V1TaxonomyMetadataResponse
If the method is called asynchronously, returns the request thread.
- taxonomy_metadata_post(v1_taxonomy_metadata_request, **kwargs)
Use taxonomic identifiers to get taxonomic metadata by post # noqa: E501
Using NCBI Taxonomy IDs or names (common or scientific) at any rank, get metadata about a taxonomic node including taxonomic identifiers, lineage information, child nodes, and gene and genome counts in JSON format. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.taxonomy_metadata_post(v1_taxonomy_metadata_request, async_req=True) >>> result = thread.get()
- Parameters
v1_taxonomy_metadata_request (V1TaxonomyMetadataRequest) –
- Keyword Arguments
_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
- V1TaxonomyMetadataResponse
If the method is called asynchronously, returns the request thread.