{"id":28209474,"url":"https://github.com/edinburgh-genome-foundry/python_codon_tables","last_synced_at":"2025-12-12T00:49:44.206Z","repository":{"id":45283054,"uuid":"80102005","full_name":"Edinburgh-Genome-Foundry/python_codon_tables","owner":"Edinburgh-Genome-Foundry","description":":bar_chart: Codon usage tables in code-friendly format + Python bindings","archived":false,"fork":false,"pushed_at":"2025-05-09T18:14:04.000Z","size":66,"stargazers_count":37,"open_issues_count":0,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-24T17:05:56.795Z","etag":null,"topics":["bioinformatics","codon-optimization","codon-usage","synbio"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Edinburgh-Genome-Foundry.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-01-26T09:46:32.000Z","updated_at":"2025-05-09T18:09:41.000Z","dependencies_parsed_at":"2025-02-15T14:13:36.560Z","dependency_job_id":"2edb1982-87d6-4d88-ae8b-3853ad7e83c6","html_url":"https://github.com/Edinburgh-Genome-Foundry/python_codon_tables","commit_stats":null,"previous_names":["edinburgh-genome-foundry/python_codon_tables","edinburgh-genome-foundry/codon-usage-tables"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Edinburgh-Genome-Foundry/python_codon_tables","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edinburgh-Genome-Foundry%2Fpython_codon_tables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edinburgh-Genome-Foundry%2Fpython_codon_tables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edinburgh-Genome-Foundry%2Fpython_codon_tables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edinburgh-Genome-Foundry%2Fpython_codon_tables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Edinburgh-Genome-Foundry","download_url":"https://codeload.github.com/Edinburgh-Genome-Foundry/python_codon_tables/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edinburgh-Genome-Foundry%2Fpython_codon_tables/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259482536,"owners_count":22864770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","codon-optimization","codon-usage","synbio"],"created_at":"2025-05-17T16:02:01.364Z","updated_at":"2025-12-12T00:49:44.144Z","avatar_url":"https://github.com/Edinburgh-Genome-Foundry.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Python Codon Tables\n===================\n\n.. image:: https://github.com/Edinburgh-Genome-Foundry/python_codon_tables/actions/workflows/build.yml/badge.svg\n    :target: https://github.com/Edinburgh-Genome-Foundry/python_codon_tables/actions/workflows/build.yml\n    :alt: GitHub CI build status\n\nProvides codon usage tables as dictionaries, for Python.\n\nTables for the following organisms are provided with the package\n(other tables can be downloaded using a TaxID):\n\n- *B. subtilis*\n- *C. elegans*\n- *D. melanogaster*\n- *E. coli*\n- *G. gallus*\n- *H. sapiens*\n- *M. musculus*\n- *M. musculus domesticus*\n- *S. cerevisiae*\n\nAll tables are from `kazusa.or.jp \u003chttp://www.kazusa.or.jp/codon/readme_codon.html\u003e`_\n(codon usages were computed using NCBI sequence data). The original publication:\n\n.. code::\n\n    Codon usage tabulated from the international DNA sequence databases:\n    status for the year 2000.\n    Nakamura, Y., Gojobori, T. and Ikemura, T. (2000) Nucl. Acids Res. 28, 292.\n\n\nUsage\n-----\n\n.. code:: python\n\n    import python_codon_tables as pct\n\n    # PRINT THE LIST OF NAMES OF ALL AVAILABLE TABLES\n    print ('Available tables:', pct.available_codon_tables_names)\n\n    # LOAD ONE TABLE BY NAME\n    table = pct.get_codons_table(\"b_subtilis_1423\")\n    print (table['T']['ACA'])  # returns 0.4\n    print (table['*']['TAA'])  # returns 0.61\n\n    # LOAD ONE TABLE BY TAXID (it will get it from the internet if it is not\n    # in the builtin tables)\n    table = pct.get_codons_table(1423)\n    print (table['T']['ACA'])  # returns 0.4\n    print (table['*']['TAA'])  # returns 0.61\n\n    # LOAD ALL BUIL-IN TABLES AT ONCE\n    codons_tables = pct.get_all_available_codons_tables()\n    print (codons_tables['c_elegans_6239']['L']['CTA'])  # returns 0.09\n\n- 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.\n\n- 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!)\n\n\nThe package can also use codon usage data from a CSV file in the form:\n\n```\namino_acid,codon,relative_frequency\n*,UAA,0.64\n*,UAG,0.07\n*,UGA,0.29\nA,GCA,0.21\nA,GCC,0.27\nK,AAA,0.76\nK,AAG,0.24\netc.\n```\n\n\nContribute\n----------\n\nThis project was started at the Edinburgh Genome Foundry by Zulko and is released on\n`Github \u003chttps://github.com/Edinburgh-Genome-Foundry/python_codon_tables\u003e`_\nunder the CC0 (Public Domain) license (and no warranty whatsoever, please cross-check the codon usage with other sources if you are not sure).\nFeel free to add other tables if you think of more commonly used species.\n\n\nInstallation\n------------\n\nvia pip:\n\n.. code:: bash\n\n    pip install python_codon_tables\n\nManual:\n\n.. code:: bash\n\n    python setup.py install\n\n\nMore biology software\n---------------------\n\n.. image:: https://raw.githubusercontent.com/Edinburgh-Genome-Foundry/Edinburgh-Genome-Foundry.github.io/master/static/imgs/logos/egf-codon-horizontal.png\n  :target: https://edinburgh-genome-foundry.github.io/\n\nThis library is part of the `EGF Codons \u003chttps://edinburgh-genome-foundry.github.io/\u003e`_ synthetic biology software suite for DNA design, manufacturing and validation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedinburgh-genome-foundry%2Fpython_codon_tables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedinburgh-genome-foundry%2Fpython_codon_tables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedinburgh-genome-foundry%2Fpython_codon_tables/lists"}