UniProt utils.
Project description
UniProtU Package
Basic UniProt utils.
Python
Python>=3.10
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.2.tar.gz
(21.2 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.2.tar.gz.
File metadata
- Download URL: uniprotu-0.1.2.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4040418a3f2d749d5c2afed9b46d71792c3f3bb123c1796d6a646bdfde0985d2
|
|
| MD5 |
1c44ad76e9baef4e437452dc48b4b120
|
|
| BLAKE2b-256 |
f648cdaf1491371654effa3a6ecfe5c4922ffc1b75ebad73f5ae97ab806df0cf
|
File details
Details for the file uniprotu-0.1.2-py3-none-any.whl.
File metadata
- Download URL: uniprotu-0.1.2-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 |
cb6975dda2c9ac9673cf71d581aef391f1a63412b69d66ac127c528e84e9d467
|
|
| MD5 |
832f840b882b6be0112600c006d42bb5
|
|
| BLAKE2b-256 |
641ffeb6a8af38b95dd3dea553a1afda18a14ac4c6aa7013bf7fdf693ac49cf7
|