PCR Primer Check
Output Only PCR-valid DNA Sequences
If desired, poolgen can perform a “PCR primer check” on all DNA sequences generated, and output only those sequences that are less likely to have problematic PCR primers. This can be a useful practical consideration for DNA sequences requiring PCR amplification in the lab.
To make poolgen output only PCR-valid DNA sequences set the "PCR-screen DNA sequences" flag in settings.json to "Yes".
Note
If DNA sequence generation is slow with PCR primer checking on, it can be sped up by setting flag USE_NUPACK_FOR_PRIMER_DIMERS = False in pcrprimers.py, or by simply deleting the NUPACK python module in the installation directory. Primer dimers are often quite rare at the annealing temperature and so not checking for them often does not make a significant difference.
Get Valid Primers for a Specific DNA Sequence
The following utility command will return all valid forward and reverse primers for a specific DNA sequence (if any exist):
python3 pcrprimers.py dna.txt
where dna.txt is a one line text file containing the DNA sequence listed 5’ to 3’.
An output similar to the below will be generated:
-------------------------------
DNA Sequence PCR Primer Check
-------------------------------
2410 nt DNA sequence supplied.
NUPACK will be used to check for primer dimers.
5'-GTTCACCGAC...............GTGCGCTTTG-3'
----------------------------------> DNA strand
||||||||||
<--------- reverse primer
---------> forward primer
||||||||||
<---------------------------------- anti-sense DNA strand
Calculating valid primer sequences...
Forward primers 5'-3':
0 GTTCACCGACGTGGCCACGC
1 GTTCACCGACGTGGCCACGCAGC
2 GTTCACCGACGTGGCCACGCAGCTTG
3 GTTCACCGACGTGGCCACGCAGCTTGC
4 GTTCACCGACGTGGCCACGCAGCTTGCAG
5 GTTCACCGACGTGGCCACGCAGCTTGCAGG
Reverse primers 5'-3':
0 CAAAGCGCACCTTTCTTAC
1 CAAAGCGCACCTTTCTTACAG
2 CAAAGCGCACCTTTCTTACAGAAG
3 CAAAGCGCACCTTTCTTACAGAAGG
4 CAAAGCGCACCTTTCTTACAGAAGGG
5 CAAAGCGCACCTTTCTTACAGAAGGGAC
6 CAAAGCGCACCTTTCTTACAGAAGGGACC
7 CAAAGCGCACCTTTCTTACAGAAGGGACCG
Forbidden primer pairs forming dimers:
(None exist)
[Done]
STATISTICS ---------------------------------
Number of forward primers failing each test:
4 : does not end C or G
0 : has 4 base run
0 : has dinucleotide repeat
3 : has 3' off-target binding on DNA anti-sense sequence
2 : has 3' off-target binding on DNA sequence
0 : has internal secondary structure at annealing temperature 60C
Number of forward primers failing each test:
5 : does not end C or G
0 : has 4 base run
0 : has dinucleotide repeat
0 : has 3' off-target binding on DNA anti-sense sequence
1 : has 3' off-target binding on DNA sequence
0 : has internal secondary structure at annealing temperature 60C
--------------------------------------------
Finally, it is up to the user to choose one specific forward-reverse primer pair from the options suggested, based on melting temperature considerations etc.
Note
The final choice of primer pair is left to the end user. This is because primer Tm is heavily dependent on the reaction buffer required for the polymerase. A universal primer Tm calculator does not exist: rather, different manufacturers tend to have specialised Tm calculators which apply specific buffer corrections optimised to the particular polymerase products/kits they provide. It is hence left to the user to choose the final forward-reverse primer pair using a Tm calculator of their choice.
PCR Primer Check Algorithm
The algorithm which calculates valid forward and reverse primers for a long DNA sequence is as follows:
Generate all possible forward primers and all possible reverse primers for the DNA sequence, where primer size is from 18nt to 30nt.
- Go through all forward and reverse primers and reject those which do not pass ALL of the following tests:
A primer must end in C or G at 3’
A primer must not contain 4 base runs, such as AAAA, GGGG etc.
A primer must not contain di-nucleotide repeats of length 6 or above, e.g. ATATAT
A primer must not have significant off-target 3’ binding sites along the DNA strand or anti-sense strands. An off-target site is defined as one in which 8 or more consecutive base pairs are hybridised at the end of the primer, including the base at the primer 3’
A primer must not have any internal secondary structure in its MFE configuration at an annealing temperature of 60C. NUPACK mfe() is used for the calculation using a standard reaction buffer of [Na]=0.05M, [Mg]=0.0125M.
Of the valid primers, there must be at least 4 unique forward-reverse primer pairs which do not form hetero- or homodimers at an annealing temperature of 60C. For a primer pair, NUPACK test tube analysis (with each primer at 50uM) is used for the equilibrium state calculation: >95% strands in the system at equilibrium must exist as individual primer strands.
If step 3 is passed, the DNA sequence passes the PCR primer check.
Note that if the NUPACK module is not installed (see Installation) then Step 3 and Step 2(e) are skipped, and the DNA sequence passes the PCR primer check if at least 1 valid forward primer and 1 valid reverse primer exist after Step 2.