Skip to main content

gene synthesis design

Project description

Gene synthesis design: A Pythonic approach

The script is used to produce the needed DNA fragments for merging into the full-length gene with PCR. All of the resultant DNA fragments have similar melting temperatures in the overlap regions, which is important for the successful assembly of target gene via PCR.

1. Installation

in macOS and in Windows

(1) make sure you have installed Python 3.10.

(2) install the dependent packages with the following commands.

python3.10 -m pip install "biopython==1.79"
python3.10 -m pip install "matplotlib==3.6.3"

(3) install the program with the following command.

python3.10 -m pip install gene_synthesis

2. Usage

2.1 Run the script in terminal to get the needed DNA fragments for the synthesis of target gene with PCR

2.1.1 macOS

During installation, the script gene_synthesis is copied to the PATH.

 % which gene_synthesis
/Library/Frameworks/Python.framework/Versions/3.10/bin/gene_synthesis

The following steps show how to run the script.

(1) open terminal and cd to the Desktop with the following commands.

% cd
% cd Desktop

(2) make a directory, for example, ‘gene_fragments’.

% mkdir gene_fragments

(3) copy the target gene sequence file, for example, ‘beta_optimized.fasta’ (a test gene sequence that can be downloaded from the S3 directory of https://github.com/shiqiang-lin/gene-synthesis), which should be with fasta format, to the directory made in step (2). This step can be done with mouse drag and drop, or with terminal command cp. Please note that it is necessary to perform codon optimization to the target gene before running our script, which make it easier to get fragments with overlaps that have closer melting temperatures.

(4) cd to the directory made in step (2), with the following command.

% cd gene_fragments

(5) run the following command. A figure showing the melting temperature of each DNA fragment will show up, and the DNA fragments are stored in a folder in the directory ‘gene_fragments’.

% gene_synthesis beta_optimized.fasta

2.1.2 Windows

During installation, the script is copied to the PATH C:\python3.10.4\Scripts. You may cd to the directory to see if it is there. If not, you can search in 'My Computer' to find the directory where the script 'gene_synthesis' is.

The following steps show how to run the script.

(1) open terminal and cd to the Desktop with the following commands.

> cd Desktop

(2) make a directory, for example, ‘gene_fragments’.

> mkdir gene_fragments

(3) copy the target gene sequence file, for example, ‘beta_optimized.fasta’ (a test gene sequence that can be downloaded from the S3 directory of https://github.com/shiqiang-lin/gene-synthesis), which should be with fasta format, to the directory made in step (2). This step can be done with mouse drag and drop, or with terminal command copy. Please note that it is necessary to perform codon optimization to the target gene before running our script, which make it easier to get fragments with overlaps that have closer melting temperatures.

(4) cd to the directory made in step (2), with the following command.

> cd gene_fragments

(5) run the following command. A figure showing the melting temperature of each DNA fragment will show up, and the DNA fragments are stored in a folder in the directory ‘gene_fragments’.

> python3.10 C:\python3.10.4\Scripts\gene_synthesis beta_optimized.fasta

Please note that the 'C:\python3.10.4\Scripts' is the directory in which the script gene_synthesis resides. If you install the Python 3.10. 4 elsewhere, you may need to change the above directory in the command accordingly.

2.2 Use the function of the script

The function ‘get_overlap_by_Tm’ is used to get the optimal overlap sequence for the input DNA sequence. The input DNA sequence should be a string larger than 50. You also need to set a Tm value for searching the best overlap sequence from the 3’ of the DNA sequence.

An example is shown as follows.

% python3.10
Python 3.10.4 (v3.10.4:9d38120e33, Mar 23 2022, 17:29:05) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from gene_synthesis.lib import get_overlap_by_Tm
>>> gene_fragment = 'ATGCCCTTGGACAGTGTCAAAATGGACCACACGGTTAATCGGCGGAAGGCC'
>>> len(gene_fragment)
51
>>> Tm_set = 55
>>> get_overlap_by_Tm(gene_fragment,Tm_set)
('GGTTAATCGGCGGAAGGCC', 55.47568390601265, 0.4756839060126481)

The output is a tuple containing the overlap sequence, the melting temperature of the overlap sequence, and the distance between the melting temperature of the overlap sequence and Tm_set. The distance of the output overlap sequence is the smallest among all possible overlap sequences, according to which we define the optimal overlap sequence.

The minimal and maximal lengths of possible overlap sequences are set as min_overlap_len = 10 and max_overlap_len = 25, which should satisfy most cases of PCR merging of overlap DNA sequences. If you need to change the range, you may need to use the source code directly from the script in the S1 directory of https://github.com/shiqiang-lin/gene-synthesis.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gene_synthesis-0.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

gene_synthesis-0.1-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file gene_synthesis-0.1.tar.gz.

File metadata

  • Download URL: gene_synthesis-0.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.4

File hashes

Hashes for gene_synthesis-0.1.tar.gz
Algorithm Hash digest
SHA256 ed52d3523eca000197ba74453fe65a50b1c875a66a8c03c9e3c7c644cf9d574c
MD5 645bf2c449cc20b33956931577ff72b0
BLAKE2b-256 dc179fa735f1e3eba7e2b780b36a8b60b02e41c9f10494aae4b1fc8ac2ae03bf

See more details on using hashes here.

File details

Details for the file gene_synthesis-0.1-py3-none-any.whl.

File metadata

  • Download URL: gene_synthesis-0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.4

File hashes

Hashes for gene_synthesis-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6775da201263158e141f256728236c52c764703dee6b55366a9a0d4b11f444aa
MD5 aa515839c0292a60f8a0f80f62e14c8a
BLAKE2b-256 c8517f636d5042b30d6ea89068a53300e3ae045f4223e081dfb4174869208205

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page