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 version 1 API is considred stable and will not be subject to breaking changes. However, certain endpoints will be [deprecated](https://0-www-ncbi-nlm-nih-gov.brum.beds.ac.uk/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://0-www-ncbi-nlm-nih-gov.brum.beds.ac.uk/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.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 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]

  • updated_since (datetime) – [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]

  • updated_since (datetime) – [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]

  • updated_since (datetime) – [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_accession_availability(accessions, **kwargs)

Check available viruses by accession GET # noqa: E501

Check available viruses GET # 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_accession_availability(accessions, async_req=True)
>>> result = thread.get()
Parameters

accessions ([str]) – virus sequence accessions

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

V1VirusAvailability

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

virus_accession_availability_post(v1_virus_availability_request, **kwargs)

Check available viruses by accession POST # noqa: E501

Check available viruses 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.virus_accession_availability_post(v1_virus_availability_request, async_req=True)
>>> result = thread.get()
Parameters

v1_virus_availability_request (V1VirusAvailabilityRequest) –

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

V1VirusAvailability

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

virus_genome_download(taxon, **kwargs)

Download a coronavirus genome dataset by taxon # noqa: E501

Download a coronavirus genome dataset 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]

  • updated_since (datetime) – [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_download_accession(accessions, **kwargs)

Download a coronavirus genome dataset by accession # noqa: E501

Download a coronavirus genome dataset by 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.virus_genome_download_accession(accessions, async_req=True)
>>> result = thread.get()
Parameters

accessions ([str]) – Accessions accessions = 16;

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]

  • updated_since (datetime) – [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_download_post(v1_virus_dataset_request, **kwargs)

Get a coronavirus genome dataset by post # noqa: E501

The ‘GET’ version of download is limited by the size of the GET URL (2KB, which works out to about 140 genomic accessions). The POST operation is provided to allow users to supply a larger number of accessions in a single request. # 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_post(v1_virus_dataset_request, async_req=True)
>>> result = thread.get()
Parameters

v1_virus_dataset_request (V1VirusDatasetRequest) –

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.

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]

  • updated_since (datetime) – [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_summary_accession(accessions, **kwargs)

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

Get summary data for Coronaviridae genomes by 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.virus_genome_summary_accession(accessions, async_req=True)
>>> result = thread.get()
Parameters

accessions ([str]) – Accessions accessions = 16;

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]

  • updated_since (datetime) – [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_summary_post(v1_virus_dataset_request, **kwargs)

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

The ‘GET’ version is limited by the size of the GET URL (2KB, which works out to about 140 genomic accessions). The POST operation is provided to allow users to supply a larger number of accessions in a single request. # 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_post(v1_virus_dataset_request, async_req=True)
>>> result = thread.get()
Parameters

v1_virus_dataset_request (V1VirusDatasetRequest) –

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

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]

  • updated_since (datetime) – [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.

virus_reports_by_acessions(accessions, **kwargs)

Get virus metadata by accession # noqa: E501

Get virus metadata by accesion. By default, in paged JSON format, but also available as tabular (accept: x-tabular) or json-lines (accept: x-jsonlines) # 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_reports_by_acessions(accessions, async_req=True)
>>> result = thread.get()
Parameters

accessions ([str]) – genome sequence accessions

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

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

  • filter_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]

  • filter_updated_since (datetime) – [optional]

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

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

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

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

  • returned_content (V1VirusDataReportRequestContentType) – Return either virus genome accessions, or complete virus metadata. [optional]

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

  • page_size (int) – The maximum number of virus data reports to return. Default is 20 and maximum is 1000. If the number of results exceeds the page size, page_token can be used to retrieve the remaining results.. [optional] if omitted the server will use the default value of 20

  • page_token (str) – A page token is returned from a GetVirusDataReports call with more than page_size results. Use this token, along with the previous VirusDataReportRequest parameters, to retrieve the next page of results. When page_token is empty, all results have been retrieved.. [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

V1reportsVirusDataReportPage

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

virus_reports_by_post(v1_virus_data_report_request, **kwargs)

Get virus metadata by POST # noqa: E501

Get virus metadata. By default, in paged JSON format, but also available as tabular (accept: x-tabular) or json-lines (accept: x-jsonlines) # 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_reports_by_post(v1_virus_data_report_request, async_req=True)
>>> result = thread.get()
Parameters

v1_virus_data_report_request (V1VirusDataReportRequest) –

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

V1reportsVirusDataReportPage

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

virus_reports_by_taxon(taxon, **kwargs)

Get virus metadata by taxon # noqa: E501

Get virus metadata by taxon. By default, in paged JSON format, but also available as tabular (accept: x-tabular) or json-lines (accept: x-jsonlines) # 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_reports_by_taxon(taxon, async_req=True)
>>> result = thread.get()
Parameters

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

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

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

  • filter_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]

  • filter_updated_since (datetime) – [optional]

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

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

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

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

  • returned_content (V1VirusDataReportRequestContentType) – Return either virus genome accessions, or complete virus metadata. [optional]

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

  • page_size (int) – The maximum number of virus data reports to return. Default is 20 and maximum is 1000. If the number of results exceeds the page size, page_token can be used to retrieve the remaining results.. [optional] if omitted the server will use the default value of 20

  • page_token (str) – A page token is returned from a GetVirusDataReports call with more than page_size results. Use this token, along with the previous VirusDataReportRequest parameters, to retrieve the next page of results. When page_token is empty, all results have been retrieved.. [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

V1reportsVirusDataReportPage

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

Generated May 25, 2023