webservices.uniprot¶
Protein information from UniProt.
UniprotQuery
¶
Queries against the UniProt web service.
Responses are cached on disk for CACHE_DURATION_ONTOLOGY hours, see
pymetadata.CACHE_USE. If UniProt cannot be reached, cached content is used
however old it is.
query
staticmethod
¶
Query the information of a protein.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
accession
|
str
|
accession of UniProt, e.g., |
required |
cache
|
bool | None
|
cache the response, defaults to |
None
|
cache_path
|
Path | None
|
directory for cached responses, defaults to
|
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
The protein information, empty if the accession is invalid, unknown |
dict[str, Any]
|
or inactive, or if UniProt cannot be reached and nothing is cached. |