A simple tool to produce DNA sequences with the most abundant codons in a specific organism. This tool provides a basic implementation of codon optimization, using a reference codon usage database. More advanced tools like DNAChisel and CodonBERT offer more sophisticated and optimized approaches to codon optimization.
The tool uses a reference codon usage database based on human and mouse data. You can find the database at Kazusa Codon Usage Database. The publication can be accessed via PubMed.
-h, --help
Show this help message and exit.-input FILENAME
Input path to the fasta file containing sequences to optimize (default: local).-reffreqtab FILENAME
Input path to the reference frequency table. The table should be in a specific format (see thereference_seq
folder) (default: Homo sapiens).-output FILENAME
Output fasta file with codon optimized sequences (default: local).-nolog
Disable log output (default: False).--version
Show program's version number and exit.
-
Clone the repository:
git clone https://github.com/jeromelane/codon_optimizer.git cd codon_optimizer
-
Create a virtual environment and install dependencies:
python3 -m venv venv source venv/bin/activate pip install -e .
-
Most simple execution:
codon_optimizer -input myfile.fa
For example,
myfile.fa
could be/your/absolute/path/to/tests/cases/input_coding_rna.fa
. -
Disable logging:
codon_optimizer -input myfile.fa -nolog
-
Use a specific codon usage table:
codon_optimizer -input myfile.fa -reffreqtab codonusage.txt
-
Install
pytest
:source venv/bin/activate pip install pytest
-
Run tests using
pytest
:pytest tests
This will run the test suite and display the results in the terminal.
-
Log file creation: During execution, a log file will be created at
output/codon_optimizer.log
if logging is enabled.