Skip to content

jeromelane/codon_optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codon_optimizer

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.

Parameters

  • -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 the reference_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.

Installation

  1. Clone the repository:

    git clone https://github.com/jeromelane/codon_optimizer.git
    cd codon_optimizer
  2. Create a virtual environment and install dependencies:

    python3 -m venv venv
    source venv/bin/activate
    pip install -e .

Usage

  1. Most simple execution:

    codon_optimizer -input myfile.fa 

    For example, myfile.fa could be /your/absolute/path/to/tests/cases/input_coding_rna.fa.

  2. Disable logging:

    codon_optimizer -input myfile.fa -nolog
  3. Use a specific codon usage table:

    codon_optimizer -input myfile.fa -reffreqtab codonusage.txt

Testing

  1. Install pytest:

    source venv/bin/activate
    pip install pytest
  2. Run tests using pytest:

    pytest tests

    This will run the test suite and display the results in the terminal.

  3. Log file creation: During execution, a log file will be created at output/codon_optimizer.log if logging is enabled.

About

Substitute codons by those that are the most frequent in a specific organism

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages