Optimize DNA sequences under constraints.
DNA Chisel (complete documentation here) is a Python library for optimizing DNA sequences with respect to a set of constraints and optimization objectives. It comes with over 15 classes of sequence specifications which can be composed to, for instance, codon-optimize genes, meet the constraints of a commercial DNA provider, avoid homologies between sequences, tune GC content, or all of this at once!
DNA Chisel also allows users to define their own specifications in Python, making the library suitable for a large range of automated sequence design applications, and complex custom design projects. It can be used as a Python library, a command-line interface, or a web application.
Example of use
from dnachisel import * # DEFINE THE OPTIMIZATION PROBLEM some_sequence = random_dna_sequence(10000) problem = DnaOptimizationProblem( sequence=some_sequence, constraints=[ AvoidPattern("BsaI_site"), EnforceGCContent(mini=0.3, maxi=0.7, window=50), EnforceTranslation(location=(500, 1400)) ], objectives=[CodonOptimize(species='e_coli', location=(500, 1400))] ) # SOLVE THE CONSTRAINTS, OPTIMIZE WITH RESPECT TO THE OBJECTIVE problem.resolve_constraints() problem.optimize() # PRINT SUMMARIES TO CHECK THAT CONSTRAINTS PASS print(problem.constraints_text_summary()) print(problem.objectives_text_summary())
Alternatively, DNA Chisel lets you define problems by annotating a Genbank file. You can also define a problem by annotating directly a Genbank as follows:
See this page for an overview of available specifications.
pip install dnachisel[reports]
(you can omit the [reports] suffix if you intend to use dnachisel only for sequence optimization, without generating figures or PDF reports)
License: MIT, Copyright Edinburgh Genome Foundry
More biology software
DNA Chisel is part of the EGF Codons synthetic biology software suite for DNA design, manufacturing and validation.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for dnachisel-3.2.9-py3-none-any.whl