Skip to main content

A simple client library for UniProt

Project description

Proteo

A simple Python library for working with UniProt, the Universal Protein resource.

Installation

pip install proteo

Usage

from proteo.uniprot import UniprotClient

# Initialize a client
u = UniprotClient()

# Use the get_protein method to retrieve a protein record by accession number
accession_number = "B5ZC00"
response = u.get_protein(accession_number)

# Protein data is returned as a dictionary
print(response['gene'])
#glyQS

print(response['recommended_name'])
#Glycine--tRNA ligase

print(response['sequence'])
#MKNKFKTQEELVNHLKTVGFVFANSEIYNGLANAWDYGPLGVLLKNNLKNLWWKEFVTKQKDVVGLDSAIILNPLVWKASGHLDNFSDPLIDCKNCKARYRADKLIESFDENIHIAENSSNEEFAKVLNDYEISCPTCKQFNWTEIRHFNLMFKTYQGVIEDAKNVVYLRPETAQGIFVNFKNVQRSMRLHLPFGIAQIGKSFRNEITPGNFIFRTREFEQMEIEFFLKEESAYDIFDKYLNQIENWLVSACGLSLNNLRKHEHPKEELSHYSKKTIDFEYNFLHGFSELYGIAYRTNYDLSVHMNLSKKDLTYFDEQTKEKYVPHVIEPSVGVERLLYAILTEATFIEKLENDDERILMDLKYDLAPYKIAVMPLVNKLKDKAEEIYGKILDLNISATFDNSGSIGKRYRRQDAIGTIYCLTIDFDSLDDQQDPSFTIRERNSMAQKRIKLSELPLYLNQKAHEDFQRQCQK

Response Dictionary

The protein response dictionary contains the following items:

Key Meaning
gene The gene coding the protein
name The protein's short name
organism The organism in which the protein is found
primary_accession_number The protein's UniProt accession number
recommended_name The protein's long/recommended name
sequence The amino acid sequence defining the protein

Exceptions

Proteo defines the following exceptions:

Exception Meaning
proteo.exceptions.ProteinNotFoundError Raised when no protein can be found for the accession number that was provided.

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

proteo-1.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

proteo-1.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file proteo-1.0.1.tar.gz.

File metadata

  • Download URL: proteo-1.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for proteo-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e1c2a49720804bd73febf83e8bd2d0c3032493ea443a3efe973d7198ef3b156e
MD5 ce1ba181a08f09db8604b3a72132ea5c
BLAKE2b-256 b0684bccd8a1ca4814429647d5f85c1cfe7a01a4c5badcda462aadad46fe5801

See more details on using hashes here.

File details

Details for the file proteo-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: proteo-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for proteo-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc722a93ae766a666c027543c3ec123a078667c135b4ddbd379c12a7db36930f
MD5 6092ce294c89a959308a3d5f33ffa155
BLAKE2b-256 fb081bd782bac92c9e73a553975c41266d13d8e568d639cdf83608265a3963f3

See more details on using hashes here.

Supported by

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