Skip to main content

uniprot provides a command-line and python interface to access the uniprot database

available services: map, retrieve

map map a list of ids from one format onto another using uniprots mapping api

Args:
    query: id or list of ids to be mapped
    f: from ACC | P_ENTREZGENEID | ...
    t: to ...
    format: tab by default

Help:
    for a list of all possible mappings visit
    'http://www.uniprot.org/faq/28'

retrieve request entries by uniprot acc using batch retrieval

Args:
    query: list of ids to retrieve
    format: txt by default

Help:
    possible formats:
    txt, xml, rdf, fasta, gff

Installation

From source (UNIX) as standalone only

Clone the git repository

git clone https://github.com/jdrudolph/uniprot.git

Use distutils to install the package

cd uniprot
sudo python setup.py install

Example

standalone

uniprot map ACC P_ENTREZGENEID acc_file map_file

This will read UniprotIDs seperated by whitespaces from acc_file and store them to map_file.

uniprot retrieve acc_file entries.txt

Retrieve textual etries for all uniprot ids in acc_file and save to entries.txt

Using a pipe:

echo P31749 | uniprot map ACC P_ENTREZGENEID

will print the result to stdout which can be redirected further

echo P31749 | uniprot retrieve

will print the result to stdout which can be redirected further

inside a python script

import uniprot as uni
print uni.map('P31749', f='ACC', t='P_ENTREZGENEID') # map single id
print uni.map(['P31749','Q16204'], f='ACC', t='P_ENTREZGENEID') # map list of ids
print uni.retrieve('P31749')
print uni.retrieve(['P31749','Q16204'])

Metadata

Release files for uniprot_tools 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uniprot_tools 0.4.1
File Size Uploaded
uniprot_tools-0.4.1.tar.gz 3.3 kB Details

Release files / uniprot_tools-0.4.1.tar.gz

Download URL uniprot_tools-0.4.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6649e67f815aa3d78eb487d40ac3eddd203a455dc11c58fd388f3a5df2eeca69
BLAKE2b-256 checksum
How to use checksums
f5aca29235b22d6d6201ef12317d777f8de79d4a2850dd7c1c9181beb4ef39d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4.1 This release

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page