NCBI DNA/RNA to protein translation tabled and genetic codes
Project description
Genetic Codes
A Python library for working with the NCBI Genetic Codes
The NCBI Genetic Codes are central to working with alternate genetic codes. This Python tool kit includes a library that exposes the genetic codes so you can query a codon and get its variants or query a code and get its table.
The main function that you want to use has this signature:
amino_acid = translate(codon, translation_table=1, one_letter=False)
The codon
is the codon that you want to translate as either an RNA (e.g. AUG
) or DNA (e.g. ATG
) sequence. The translation_table
is your required translation table (see the NCBI website for valid tables), and one_letter
is whether to return a three letter amino acid code (e.g. Met
or Ter
) or a one letter amino acid code (e.g. M
or *
).
The library provides other ways to access the genetic codes, and those are exemplified in the pytest
files in tests/
Installation
You can install pygenetic_code
with pip.
pip install pygenetic_code
Conda installation is coming.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.