mkt.databases.uniprot.UniProtRefSeqProteinGET

class mkt.databases.uniprot.UniProtRefSeqProteinGET(identifier: str, term_in: str | None, term_out: str | None, url_base: str, headers: str | None = None, polling_interval: int = 5, jobId: str | None = None)[source]

Bases: UniProtGET

Class to interact with UniProt API bulk download for list of RefSeqProtein identifiers via GET.

__init__(identifier: str, term_in: str | None, term_out: str | None, url_base: str, headers: str | None = None, polling_interval: int = 5, jobId: str | None = None) None

Methods

__eq__(other)

Return self==value.

__init__(identifier, term_in, term_out, url_base)

__post_init__()

check_if_job_ready()

Check if the job is ready and add json if so.

check_response(res)

Check the response status code for errors.

concatenate_json_batches()

Concatenate json from batches and return as dictionary.

create_query_url()

Create URL for UniProt API query.

get_batch()

Get batches of json from UniProt API.

get_next_link(headers)

Get next link from headers.

maybe_get_gene_names()

Get list of gene names from UniProt ID and add as list_gene_names attr.

process_identifier()

Process identifier string input to standardize, overwrite, and add as list.

query_api()

Get response from API which tries to save as json in instance; otherwise saves as text.

Attributes

__dataclass_fields__

__dataclass_params__

__match_args__

headers

Headers for API (use ast.as_literal to convert to dict).

jobId

Job ID for bulk download; applies to UniProt bulk downloading.

polling_interval

Interval in seconds to poll API for job status.

identifier

Identifier or comma delimited list of identifiers from which to map.

term_in

Term on which from which to map.

term_out

Term on which to which to map, if needed.

url_base

URL base for API.

__init__(identifier: str, term_in: str | None, term_out: str | None, url_base: str, headers: str | None = None, polling_interval: int = 5, jobId: str | None = None) None
check_if_job_ready()[source]

Check if the job is ready and add json if so.

concatenate_json_batches()[source]

Concatenate json from batches and return as dictionary.

maybe_get_gene_names()[source]

Get list of gene names from UniProt ID and add as list_gene_names attr.