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:
UniProtGETClass 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 the job is ready and add json if so.
check_response(res)Check the response status code for errors.
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.
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__headersHeaders for API (use ast.as_literal to convert to dict).
jobIdJob ID for bulk download; applies to UniProt bulk downloading.
polling_intervalInterval in seconds to poll API for job status.
identifierIdentifier or comma delimited list of identifiers from which to map.
term_inTerm on which from which to map.
term_outTerm on which to which to map, if needed.
url_baseURL 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