Skip to main content

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

Project description

GitHub CI build status

Provides codon usage tables as dictionnaries, for Python 3+.

Tables for the following organisms are provided with the library (any other table can be downloaded using a TaxID):

  • B. subtilis

  • C. elegans

  • D. melanogaster

  • E. coli

  • G. gallus

  • H. sapiens

  • M. musculus

  • M. musculus domesticus

  • S. cerevisiae

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.

Usage

import python_codon_tables as pct

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

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

# LOAD ONE TABLE BY TAXID (it will get it from the internet if it is not
# in the builtin tables)
table = pct.get_codons_table(1423)
print (table['T']['ACA'])  # returns 0.4
print (table['*']['TAA'])  # returns 0.61

# LOAD ALL BUIL-IN TABLES AT ONCE
codons_tables = pct.get_all_available_codons_tables()
print (codons_tables['c_elegans_6239']['L']['CTA'])  # returns 0.09
  • Notice that by default the tables use nucleotide T instead of U. Using get_codons_table('e_coli', replace_U_by_T=False) will leave Us as Us.

  • In get_codons_table you can also provide a “shorthand” notation b_subtilis, which will be automatically extended to b_subtilis_1423 as it appears so in the built-in table (use this feature at your own risks!)

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

More biology software

https://raw.githubusercontent.com/Edinburgh-Genome-Foundry/Edinburgh-Genome-Foundry.github.io/master/static/imgs/logos/egf-codon-horizontal.png

This library is part of the EGF Codons synthetic biology software suite for DNA design, manufacturing and validation.

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

Uploaded Source

Built Distribution

python_codon_tables-0.1.12-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_codon_tables-0.1.12.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for python_codon_tables-0.1.12.tar.gz
Algorithm Hash digest
SHA256 a733e8479e6753c39b3efd62204e76aa9a83e7119d60b9b5b86de7083e88e3a6
MD5 92164ef163244d411d31ba6ce65473a7
BLAKE2b-256 37935f40dceaf6e0104c03b54fb89fa7f7dcafdff6159721f1c2f812fff57784

See more details on using hashes here.

File details

Details for the file python_codon_tables-0.1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for python_codon_tables-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 42a5dd87c04273680a323b92ef26d8e4d894932eeef417bc7f2af2869b7b49bb
MD5 13cd27d36b34077d3e26241b33cc579e
BLAKE2b-256 2d8fe48d9b9ce1da48bc14c7258975d76aa79ffb49b7ca287fdd22293d30674d

See more details on using hashes here.

Supported by

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