Skip to main content

Codon Usage Tables for Python, from kazusa.or.jp

Project description

https://travis-ci.org/Edinburgh-Genome-Foundry/codon-usage-tables.svg?branch=master

Provides codon usage tables as dictionnaries, for Python 3+

Supported organisms include:

  • B. subtilis

  • C. elegans

  • D. melanogaster

  • E. coli

  • G. gallus

  • H. sapiens

  • M. musculus

  • M. musculus domesticus

  • S. cerevisiae

It is also possible to download new tables directly with download_codons_table(taxid=316407).

All the tables are from kazusa.or.jp and here is the original paper to cite:

Codon usage tabulated from the international DNA sequence databases:
status for the year 2000.
Nakamura, Y., Gojobori, T. and Ikemura, T. (2000) Nucl. Acids Res. 28, 292.

Contribute

This project was started at the Edinburgh Genome Foundry by Zulko and is released on Github under a Public Domain licence (and no warranty whatsoever, please cross-check the codon usage with other sources if you are not sure). Feel free to add other tables if you think of more commonly used species.

Installation

via pip:

pip install python_codon_tables

Manual:

(sudo) python setup.py install

Usage

import python_codon_tables as pct

# PRINT THE LIST OF NAMES OF ALL AVAILABLE TABLES
print ('Available tables:', pct.available_codon_tables)

# LOAD ONE TABLE BY NAME
table = pct.get_codons_table("b_subtilis_1423")
print (table['T']['ACA'])  # returns 0.4
print (table['*']['UAA'])  # returns 0.61

# LOAD ALL TABLES AT ONCE
codons_tables = pct.get_all_available_codons_tables()
print (codons_tables['c_elegans_6239']['L']['CUA'])  # returns 0.09

# GET A TABLE DIRECTLY FROM THE INTERNET
table = pct.download_codons_table(taxid=316407)
print (table['*']['UGA'])  # returns 0.29

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

python_codon_tables-0.1.6.tar.gz (8.7 kB view details)

Uploaded Source

File details

Details for the file python_codon_tables-0.1.6.tar.gz.

File metadata

  • Download URL: python_codon_tables-0.1.6.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for python_codon_tables-0.1.6.tar.gz
Algorithm Hash digest
SHA256 d924f124cae824a9612ec0e1c34737afa02e63495afcdfc838ebd2f09a66d924
MD5 561b69a83abf0e7ef5472da3a1da57a4
BLAKE2b-256 a63c5df9236303457dfa0c4b2abdb2fb2e897f16358574b354ac60495b601878

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