Skip to main content

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.3.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uniprotu-0.1.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file uniprotu-0.1.3.tar.gz.

File metadata

  • Download URL: uniprotu-0.1.3.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.1

File hashes

Hashes for uniprotu-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1899e7ffc4c3ec22152f3c3cc5433d9fa841b098d06ef379e037e64f6baf4b5b
MD5 6d6534fc3d84c16facfaec8fc99b7f5c
BLAKE2b-256 4df423447d72ce38f8b5dc9394f3fefe2177636b75caed705f4b84068bf0bd87

See more details on using hashes here.

File details

Details for the file uniprotu-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: uniprotu-0.1.3-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

Hashes for uniprotu-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 114c666f7a19c664e9561a200933b3e20a7eed61d2d712b8ca01dde294604f3f
MD5 f888465a77a40a00af212628485bd981
BLAKE2b-256 ecf8a95b2f5aa6280d5734e6db97c9f3244340e2c116da187f932f30d8c0b56a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page