Module: ncbi.datasets.openapi.api.virus_api
Python API: ncbi.datasets.openapi.api.virus_api
Module: ncbi.datasets.openapi.api.virus_api
- class
ncbi.datasets.openapi.api.virus_api.VirusApi(api_client=None)¶ Bases:
objectsars2_protein_download(proteins, **kwargs)¶Download SARS-CoV-2 protein and CDS datasets by protein name
Download a SARS-CoV-2 protein datasets 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
bool (async_req) – execute request asynchronously
proteins (list[str]) – Which proteins to retrieve in the data package (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date and time. April 1, 2020 midnight UTC should be formatted as follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
include_annotation_type (list[str]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.
filename (str) – Output file name.
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
fileIf the method is called asynchronously, returns the request thread.
sars2_protein_download_with_http_info(proteins, **kwargs)¶Download SARS-CoV-2 protein and CDS datasets by protein name
Download a SARS-CoV-2 protein datasets 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_with_http_info(proteins, async_req=True) result = thread.get()
- Parameters
bool (async_req) – execute request asynchronously
proteins (list[str]) – Which proteins to retrieve in the data package (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date and time. April 1, 2020 midnight UTC should be formatted as follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
include_annotation_type (list[str]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.
filename (str) – Output file name.
_return_http_data_only – response data without head status code and headers
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
tuple(file, status_code(int), headers(HTTPHeaderDict))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
Download a summary of available SARS-CoV-2 protein datasets 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
bool (async_req) – execute request asynchronously
proteins (list[str]) – Which proteins to retrieve in the data package (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date and time. April 1, 2020 midnight UTC should be formatted as follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
include_annotation_type (list[str]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
V1alpha1DownloadSummaryIf the method is called asynchronously, returns the request thread.
sars2_protein_summary_with_http_info(proteins, **kwargs)¶Summary of SARS-CoV-2 protein and CDS datasets by protein name
Download a summary of available SARS-CoV-2 protein datasets 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_with_http_info(proteins, async_req=True) result = thread.get()
- Parameters
bool (async_req) – execute request asynchronously
proteins (list[str]) – Which proteins to retrieve in the data package (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date and time. April 1, 2020 midnight UTC should be formatted as follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
include_annotation_type (list[str]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.
_return_http_data_only – response data without head status code and headers
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
tuple(V1alpha1DownloadSummary, status_code(int), headers(HTTPHeaderDict))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.
Get protein metadata in tabular format for SARS-CoV-2 genomes. 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
bool (async_req) – execute request asynchronously
proteins (list[str]) – Which proteins to retrieve in the data package (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date and time. April 1, 2020 midnight UTC should be formatted as follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
table_fields (list[str]) – Specify which fields to include in the tabular report.
format (str) – Choose download format.
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
StreamResultOfV1alpha1TabularOutputIf the method is called asynchronously, returns the request thread.
sars2_protein_table_with_http_info(proteins, **kwargs)¶Get SARS-CoV-2 protein metadata in a tabular format.
Get protein metadata in tabular format for SARS-CoV-2 genomes. 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_with_http_info(proteins, async_req=True) result = thread.get()
- Parameters
bool (async_req) – execute request asynchronously
proteins (list[str]) – Which proteins to retrieve in the data package (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
released_since (datetime) – If set, limit results to viral genomes that have been released after a specified date and time. April 1, 2020 midnight UTC should be formatted as follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
table_fields (list[str]) – Specify which fields to include in the tabular report.
format (str) – Choose download format.
_return_http_data_only – response data without head status code and headers
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
tuple(StreamResultOfV1alpha1TabularOutput, status_code(int), headers(HTTPHeaderDict))If the method is called asynchronously, returns the request thread.
virus_genome_download(taxon, **kwargs)¶Download Coronavirus genome datasets by taxon
Download a Coronavirus genome datasets by taxon 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
bool (async_req) – execute request asynchronously
taxon (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
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 follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
pangolin_classification (str) – If set, limit results to genomes classified to this lineage by the PangoLearn tool.
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
exclude_sequence (bool) – Set to true to omit the genomic sequence.
include_annotation_type (list[str]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.
filename (str) – Output file name.
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
fileIf the method is called asynchronously, returns the request thread.
virus_genome_download_with_http_info(taxon, **kwargs)¶Download Coronavirus genome datasets by taxon
Download a Coronavirus genome datasets by taxon 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_with_http_info(taxon, async_req=True) result = thread.get()
- Parameters
bool (async_req) – execute request asynchronously
taxon (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
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 follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
pangolin_classification (str) – If set, limit results to genomes classified to this lineage by the PangoLearn tool.
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
exclude_sequence (bool) – Set to true to omit the genomic sequence.
include_annotation_type (list[str]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.
filename (str) – Output file name.
_return_http_data_only – response data without head status code and headers
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
tuple(file, status_code(int), headers(HTTPHeaderDict))If the method is called asynchronously, returns the request thread.
virus_genome_summary(taxon, **kwargs)¶Get summary data for Coronaviridae genomes by taxon
Get summary data and download by command line instructions for Coronaviridae genomes by taxon. 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
bool (async_req) – execute request asynchronously
taxon (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
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 follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
pangolin_classification (str) – If set, limit results to genomes classified to this lineage by the PangoLearn tool.
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
exclude_sequence (bool) – Set to true to omit the genomic sequence.
include_annotation_type (list[str]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
V1alpha1DownloadSummaryIf the method is called asynchronously, returns the request thread.
virus_genome_summary_with_http_info(taxon, **kwargs)¶Get summary data for Coronaviridae genomes by taxon
Get summary data and download by command line instructions for Coronaviridae genomes by taxon. 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_with_http_info(taxon, async_req=True) result = thread.get()
- Parameters
bool (async_req) – execute request asynchronously
taxon (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
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 follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
pangolin_classification (str) – If set, limit results to genomes classified to this lineage by the PangoLearn tool.
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
exclude_sequence (bool) – Set to true to omit the genomic sequence.
include_annotation_type (list[str]) – Select additional types of annotation to include in the data package. If unset, no annotation is provided.
_return_http_data_only – response data without head status code and headers
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
tuple(V1alpha1DownloadSummary, status_code(int), headers(HTTPHeaderDict))If the method is called asynchronously, returns the request thread.
virus_genome_table(taxon, **kwargs)¶Get viral genomic metadata in a tabular format.
Get viral genomic metadata in tabular format for Coronaviridae genomes by taxon. 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
bool (async_req) – execute request asynchronously
taxon (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
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 follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
pangolin_classification (str) – If set, limit results to genomes classified to this lineage by the PangoLearn tool.
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
table_fields (list[str]) – Specify which fields to include in the tabular report.
format (str) – Choose download format (tsv, csv or jsonl).
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
StreamResultOfV1alpha1TabularOutputIf the method is called asynchronously, returns the request thread.
virus_genome_table_with_http_info(taxon, **kwargs)¶Get viral genomic metadata in a tabular format.
Get viral genomic metadata in tabular format for Coronaviridae genomes by taxon. 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_with_http_info(taxon, async_req=True) result = thread.get()
- Parameters
bool (async_req) – execute request asynchronously
taxon (str) – NCBI Taxonomy ID or name (common or scientific) at any taxonomic rank (required)
refseq_only (bool) – If true, limit results to RefSeq genomes.
annotated_only (bool) – If true, limit results to annotated genomes.
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 follows: 2020-04-01T00:00:00.000Z.
host (str) – If set, limit results to genomes extracted from this host (Taxonomy ID or name).
pangolin_classification (str) – If set, limit results to genomes classified to this lineage by the PangoLearn tool.
geo_location (str) – Assemblies from this location (country and state, or continent).
complete_only (bool) – only include complete genomes.
table_fields (list[str]) – Specify which fields to include in the tabular report.
format (str) – Choose download format (tsv, csv or jsonl).
_return_http_data_only – response data without head status code and headers
_preload_content – if
False, theurllib3.HTTPResponseobject will be returned without reading/decoding response data. Default isTrue._request_timeout – 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.
- Returns
tuple(StreamResultOfV1alpha1TabularOutput, status_code(int), headers(HTTPHeaderDict))If the method is called asynchronously, returns the request thread.