UniProt utils.
Project description
UniProtU Package
Basic UniProt utils.
Python
Python>=3.13
Installing
UniprotU is available on PyPI:
pip install uniprotu
Usage
import uniprotu as u
print("Ensembl ID to UniProt ID:")
ensmbl_id: str = "ENST00000559488"
uniprot_id = u.ensembl_id2uniprot_id(ensmbl_id)
print(f"{ensmbl_id} => {uniprot_id}.")
print("\nAA sequence:")
print(u.AA_seq(uniprot_id))
print("\nCross-reference:")
df_cross = u.get_CrossReferences_databases_info(uniprot_id)
print(df_cross.to_string(max_rows=10))
print("\nDomains:")
# Set the list of features to retrieve. Set to [] to retrieve all features.
uniprot_features: list[str] = ["Topological domain", "Transmembrane", "Domain", "Repeat", "Region"]
df_domains = u.retrieve_protein_data_features_subset(uniprot_id, uniprot_features)
print(df_domains.to_string())
print("\nGet all protein data:")
protein_data = u.lookup_protein_data(uniprot_id)
print(f"protein_data contains {len(protein_data):,} entries...")
print("\nGet protein features:")
df_features = u.retrieve_protein_data_features_subset(uniprot_id, [])
print(df_features.to_string(max_rows=10))
print("\nUniProt ID to Ensembl ID:")
uid: str = 'P42336'
eid = u.uniprot_id2ensembl_id(uid)
print(f"{uid} => {eid}")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
uniprotu-0.1.0.tar.gz
(11.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uniprotu-0.1.0.tar.gz.
File metadata
- Download URL: uniprotu-0.1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d634047e4ce3ec8ee6998988e0e706741f703347d7ef79423d73a187b9c5efaf
|
|
| MD5 |
79e08eb2c335df046bbb94e26d5f94db
|
|
| BLAKE2b-256 |
06114d25dc2aad41b25233627ff2411da6b555e1da11b6b23e5fc2b153222311
|
File details
Details for the file uniprotu-0.1.0-py3-none-any.whl.
File metadata
- Download URL: uniprotu-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d230240764aff25e959a5774ec7775578fdda5780abd26dd82d6febebc1cca72
|
|
| MD5 |
779151311caec279958ad00406636e54
|
|
| BLAKE2b-256 |
d35236ca8cdabcee6aea94f107085b763435553e15114e21699e1ff04b1747c8
|