DnaChisel
DnaChisel copied to clipboard
Sequence diversity in output from CodonOptimize
Hello! Thanks for this great tool. I am exploring using it on a project.
Is there an existing way to get dnachisel to return a few codon optimized sequences, maybe some that are slightly sub-optimal so I can have more diversity when ordering codon optimized sequences for DNA synthesis?
Best, Josh
Hello! The short answer is that DNA Chisel was not originally developed with solution diversity in mind, but there are workarounds to achieve this. Off the top of my head:
-
Solution 1: use a loop where codon-optimized sequences are generated sequentially, and each new sequence must differ from all previous sequences by at least X nucleotides. (it would be a variant of this example)
-
Solution 2: Use the
CodonOptimize()
objective together with a limiting constraintAvoidChanges(max_edits_percent=20)
, where you can varymax_edit_percent
from 0 (sequence is untouched) to 100 (the whole sequence can be edited if necessary). This should get you different levels of optimization. -
Solution 3: create your own CodonOptimize variant (
CodonOptimizePartially
) that takes a "target score" as parameter and will aim to optimize the codons until this particular target score is reached. Then generate sequences optimized with various target scores. This is the cleanest but maybe a bit of a step if you are new to Chisel. -
Solution 4: following this older thread about generating non-optimal solutions, the OP created a new project to use DNA Chisel with diversity-generating methods similar to the ones used by the D-tailor package. This could be useful to you.
Thanks so much for the reply! I will do some development and let you know how it goes.
Hey @jlerman44 I have a similar need for optimizing sequences to be synthesized. Did you ever reach a solution that you were happy with? Thanks!