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("\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("\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("\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.1.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.1.tar.gz.
File metadata
- Download URL: uniprotu-0.1.1.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 |
0c1d2cf348706dd8bd735b5f7a5daf96b3ad0543097faa078e5d39d39c5dbaf0
|
|
| MD5 |
7945411b800f8146d47faaf4280d1120
|
|
| BLAKE2b-256 |
b19b035c1d6fc770b94c4905fd4026f3608c5f10b61adc70b17073856e01b976
|
File details
Details for the file uniprotu-0.1.1-py3-none-any.whl.
File metadata
- Download URL: uniprotu-0.1.1-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 |
cf43742ea72cfd772dcc40629a02f5c166efefa484dc38ded0983d508dc7d0b1
|
|
| MD5 |
12d7be07e3e1b09aed2790581c54d735
|
|
| BLAKE2b-256 |
d51e6e1ebdd8eba1cb0955a14643e66361f304e616d47354999b7cfe546feae8
|