Module: ncbi.datasets.openapi.api.virus_api

NCBI Datasets API

Module: ncbi.datasets.openapi.api.virus_api

NCBI Datasets API

### NCBI Datasets is a resource that lets you easily gather data from NCBI. The Datasets API is still in alpha, and we’re updating it often to add new functionality, iron out bugs and enhance usability. For some larger downloads, you may want to download a [dehydrated bag](https://0-www-ncbi-nlm-nih-gov.brum.beds.ac.uk/datasets/docs/rehydrate/), 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.virus_api.VirusApi(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.

sars2_protein_download(proteins, **kwargs)

Download SARS-CoV-2 protein and CDS datasets by protein name # noqa: E501

Download a SARS-CoV-2 protein datasets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.sars2_protein_download(proteins, async_req=True)
>>> result = thread.get()
Parameters

proteins ([str]) – Which proteins to retrieve in the data package

Keyword Arguments
  • refseq_only (bool) – If true, limit results to RefSeq genomes.. [optional] if omitted the server will use the default value of False

  • annotated_only (bool) – If true, limit results to annotated genomes.. [optional] if omitted the server will use the default value of False

  • released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date (and optionally, time). April 1, 2020 midnight UTC should be formatted as ‘2020-04-01T00:00:00.000Z’. [optional]

  • host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name) All hosts by default. [optional]

  • geo_location (str) – Assemblies from this location (country and state, or continent). [optional]

  • complete_only (bool) – only include complete genomes.. [optional] if omitted the server will use the default value of False

  • include_annotation_type ([V1AnnotationForVirusType]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.. [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.

sars2_protein_summary(proteins, **kwargs)

Summary of SARS-CoV-2 protein and CDS datasets by protein name # noqa: E501

Download a summary of available SARS-CoV-2 protein datasets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.sars2_protein_summary(proteins, async_req=True)
>>> result = thread.get()
Parameters

proteins ([str]) – Which proteins to retrieve in the data package

Keyword Arguments
  • refseq_only (bool) – If true, limit results to RefSeq genomes.. [optional] if omitted the server will use the default value of False

  • annotated_only (bool) – If true, limit results to annotated genomes.. [optional] if omitted the server will use the default value of False

  • released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date (and optionally, time). April 1, 2020 midnight UTC should be formatted as ‘2020-04-01T00:00:00.000Z’. [optional]

  • host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name) All hosts by default. [optional]

  • geo_location (str) – Assemblies from this location (country and state, or continent). [optional]

  • complete_only (bool) – only include complete genomes.. [optional] if omitted the server will use the default value of False

  • include_annotation_type ([V1AnnotationForVirusType]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.. [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

V1DownloadSummary

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

sars2_protein_table(proteins, **kwargs)

Get SARS-CoV-2 protein metadata in a tabular format. # noqa: E501

Get protein metadata in tabular format for SARS-CoV-2 genomes. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.sars2_protein_table(proteins, async_req=True)
>>> result = thread.get()
Parameters

proteins ([str]) – Which proteins to retrieve in the data package

Keyword Arguments
  • refseq_only (bool) – If true, limit results to RefSeq genomes.. [optional] if omitted the server will use the default value of False

  • annotated_only (bool) – If true, limit results to annotated genomes.. [optional] if omitted the server will use the default value of False

  • released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date (and optionally, time). April 1, 2020 midnight UTC should be formatted as ‘2020-04-01T00:00:00.000Z’. [optional]

  • host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name) All hosts by default. [optional]

  • geo_location (str) – Assemblies from this location (country and state, or continent). [optional]

  • complete_only (bool) – only include complete genomes.. [optional] if omitted the server will use the default value of False

  • table_fields ([V1VirusTableField]) – Specify which fields to include in the tabular report. [optional]

  • format (V1TableFormat) – Choose download format (tsv, csv or jsonl). [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

V1TabularOutput

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

virus_genome_download(taxon, **kwargs)

Download Coronavirus genome datasets by taxon # noqa: E501

Download a Coronavirus genome datasets by taxon # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.virus_genome_download(taxon, async_req=True)
>>> result = thread.get()
Parameters

taxon (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank

Keyword Arguments
  • refseq_only (bool) – If true, limit results to RefSeq genomes.. [optional] if omitted the server will use the default value of False

  • annotated_only (bool) – If true, limit results to annotated genomes.. [optional] if omitted the server will use the default value of False

  • released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date (and optionally, time). April 1, 2020 midnight UTC should be formatted as ‘2020-04-01T00:00:00.000Z’. [optional]

  • host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name) All hosts by default. [optional]

  • pangolin_classification (str) – If set, limit results to genomes classified to this lineage by the PangoLearn tool.. [optional]

  • geo_location (str) – Assemblies from this location (country and state, or continent). [optional]

  • complete_only (bool) – only include complete genomes.. [optional] if omitted the server will use the default value of False

  • exclude_sequence (bool) – Set to true to omit the genomic sequence.. [optional] if omitted the server will use the default value of False

  • include_annotation_type ([V1AnnotationForVirusType]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.. [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.

virus_genome_summary(taxon, **kwargs)

Get summary data for Coronaviridae genomes by taxon # noqa: E501

Get summary data and download by command line instructions for Coronaviridae genomes by taxon. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.virus_genome_summary(taxon, async_req=True)
>>> result = thread.get()
Parameters

taxon (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank

Keyword Arguments
  • refseq_only (bool) – If true, limit results to RefSeq genomes.. [optional] if omitted the server will use the default value of False

  • annotated_only (bool) – If true, limit results to annotated genomes.. [optional] if omitted the server will use the default value of False

  • released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date (and optionally, time). April 1, 2020 midnight UTC should be formatted as ‘2020-04-01T00:00:00.000Z’. [optional]

  • host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name) All hosts by default. [optional]

  • pangolin_classification (str) – If set, limit results to genomes classified to this lineage by the PangoLearn tool.. [optional]

  • geo_location (str) – Assemblies from this location (country and state, or continent). [optional]

  • complete_only (bool) – only include complete genomes.. [optional] if omitted the server will use the default value of False

  • exclude_sequence (bool) – Set to true to omit the genomic sequence.. [optional] if omitted the server will use the default value of False

  • include_annotation_type ([V1AnnotationForVirusType]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.. [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

V1DownloadSummary

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

virus_genome_table(taxon, **kwargs)

Get viral genomic metadata in a tabular format. # noqa: E501

Get viral genomic metadata in tabular format for Coronaviridae genomes by taxon. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.virus_genome_table(taxon, async_req=True)
>>> result = thread.get()
Parameters

taxon (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank

Keyword Arguments
  • refseq_only (bool) – If true, limit results to RefSeq genomes.. [optional] if omitted the server will use the default value of False

  • annotated_only (bool) – If true, limit results to annotated genomes.. [optional] if omitted the server will use the default value of False

  • released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date (and optionally, time). April 1, 2020 midnight UTC should be formatted as ‘2020-04-01T00:00:00.000Z’. [optional]

  • host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name) All hosts by default. [optional]

  • pangolin_classification (str) – If set, limit results to genomes classified to this lineage by the PangoLearn tool.. [optional]

  • geo_location (str) – Assemblies from this location (country and state, or continent). [optional]

  • complete_only (bool) – only include complete genomes.. [optional] if omitted the server will use the default value of False

  • table_fields ([V1VirusTableField]) – Specify which fields to include in the tabular report. [optional]

  • format (V1TableFormat) – Choose download format (tsv, csv or jsonl). [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

V1TabularOutput

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

Generated October 14, 2021