Introduction and usage of System Design Primer

img

Polymerase Chain Reaction

PCR is a technique that is used to amplify a sample of DNA from miniscule amount of DNA (ex., DNA from a crime scene, archaeological samples, organisms that can’t be cultured).

Who developed PCR?

PCR was developed by Kary Mullis.
Kary Mullis is a scientist and surfer from Newport Beach, California.
He won a Nobel Prize in Chemistry in 1993 for the development of PCR.He was working for Cetus Corporation in the 70’s and received $10,000 bonus for the idea.

How is PCR used?

  • Medical Diagnosis: To detect and identify the causes of infectious diseases from -
  • bacteria and viruses.Genetic testing: To determine whether a genetic mutation has been passed on (ex. cystic fibrosis).
  • Evolutionary study: To gather archaeological samples and analyzed for similarities/differences.DNA
  • fingerprinting: To profile DNA from blood, hair, and skin cells for criminal identification and forensics

Stages of PCR PCR is divided into 3 stages: Denaturation Anneal

ExtensionThe denaturation stage

The double-stranded DNA sample is separated into single strands by increasing the temperature to about 95 ºC.

The annealing stage

primers anneal to the DNA strands when the temp. is lowered to about ºC.

The extension stage

the DNA Taq polymerase duplicates the original DNA with the primers as guidelines.

What is a primer?oligonucleotideA primer is a short oligonucleotide which is the reverse complement of a region of a DNA template.
It would anneal to a DNA strand to facilitate the amplification of the targeted DNA sequence.

Primer Selection variables

Primer lengthMelting TemperatureGC contentHair-pin loopSelf-dimerizationCross-dimerization

Primer Length Should be between 18 – 25 bases

The longer the primer, the more inefficient the annealing.If primers are too short, they will cause non-specific annealing and end up amplifying non-specific sequences.

Melting Temperature Formula (18-25 bp range)

Tm = 2(A+T) + 4(G+C)
The forward and reverse primers should be having similar Tm, or else amplification will be less efficient.Melting Temperature should be between 55ºC and 65ºC.

GC Content GC% = (G + C) / length of seq * 100%

The base composition should be in the range of 45% to 55%.Poly G’s or C’s can result in non-specific annealing.

Hairpin Loop Primers with hairpin loop may interfere

with annealing to the template by forming partially double-stranded structure.
Self-dimerizationPrimers may form inter-primer homology with its own copies.

Cross DimerizationForward and Reverse primers may hybridize to form primer-dimer.

Algorithm for primer design

Input DNA sequenceInput the start and end of central region.
Input the length of primersTm:
55-65oCN YGC content 45-55%Excluded primersN YHairpin and self-dimerizationY NList of acceptable primersNCross DimerizationY 

Installation

primer3-py has no external library dependencies and should compile on most linux and OS X systems that are running Python 2.7, 3.3, or 3.4.
To build primer3-py within the package directory run:

$ python setup.py build_ext --inplace

If you would like to install primer3-py in your local Python environment you may do so using either pip or the setup.py script:

$ pip install primer3-py

or

$ python setup.py install

Testing

We have included a comprehensive test suite to compare the output of the Python bindings with the output of the Primer3 binaries.
After building and (optionally) installing primer3-pyyou can run the tests using the primer3_tests.py module:

$ python primer3_tests.py

or for memory checking with valgrind:

$ valgrind --tool=memcheck --suppressions=valgrind-python.supp --leak-check=full python primer3_test.py

API - low-level thermodynamics

primer3-py includes a unified API for low-level thermodynamic calculations that are useful for routine oligonucleotide design.
The simplest API function is calcTm, which uses nearest-neighbor thermodynamics to calculate the melting temperature of a provided DNA sequence:

>>> import primer3
>>> primer3.calcTm('ATTTGGGACCAATTTGGACCAGGTT')
57.02235387653167

Higher-level thermodynamic functions include calcHairpin, calcHomodimer, and calcHeterodimer.
These functions perform a thermodynamic alignment to determine the characteristics (dH, dS, dG, Tm) of a secondary / multi-stranded structure. All three functions return a namedtuple:

>>> from primer3 import calcHeterodimer
>>> res = calcHeterodimer('CCGACCCTATGGGACC', 'TTGGTCCCATAAGGGTCGG')
>>> print(res)

thermoresult(
  structure_found=True,
  tm=39.92795428766294,
  ds=-370.12644214999796,
  dh=-127200.0,
  dg=-12405.28396717814,
  align_end_1=16,
  align_end_2=17
)

>>> print res.tm
39.92795428766294

For more detailed documentation and usage examples, see primer3/bindings.py and primer3_test.py.

API - primer design

primer3-py also includes C API bindings for the Primer3 design engine.
As mentioned above, we do not provide any additional “Pythonic” abstraction of the original design process (that’s up to you!) so the general interface is basically Boulder IO input/output in the form of Python dictionaries.

There are few deviations from the formats described in the Primer3 documentation, with notable exceptions being related to index lists and ranges (i.e., ranges are typically provided as lists/tuples, and lists of ranges as lists of lists or tuples of tuples).

Here we highlight the differences between the typical SEQUENCE_PRIMER_PAIR_OK_REGION_LIST input and the Python binding input:

Primer3 boulder IO input:   100,50,300,50 ; 900,60,,
Primer3 python input:       [[100,50,300,50], [900,60,-1,-1]]

AUTHOR

READ NEXT

Boostlog is an online community for developers
who want to share ideas and grow each other.

Delete an article

Deleted articles are gone forever. Are you sure?