Codon Scrambler

This supplementary code provides a MATLAB implementation of codon scrambling from the paper: "Combinatorial codon scrambling enables scalable gene synthesis and amplification of repetitive proteins" (doi: 10.1038/NMAT4521).

Web Server

Available here: public-beta, version 1.0.


There are 2 main functions :

1) codon_scrambler.m

2) calc_obj.m

The function "codon_scrambler.m" is used for codon scrambling of tandem-repetitive amino acid sequences, interspersed-repeat amino acid sequences, or other semi-repetitive amino acid sequences.

The function "calc_obj.m" is used to calculate the objective value of a nucleotide sequence.


The code makes use of CPLEX ILOG software (, UNAFOLD ( or, and MATLAB's Bioinformatics and Statistics toolboxes. They should be installed.

This has only been tested on the Windows and Linux x64 platforms. Use the MATLAB command, "mex mexLRS.cpp", to compile "mexLRS.cpp" used in the "calc_obj.m" function.

The UNAFold and CPLEX directories should be edited for your system by modifying "load_preferences.m".

The code was written by Nicholas Tang at Duke University, USA.