Protocol & Tutorials

Protocol: the principle of MFEprimer and how to use it to select specific primers

Selecting specific primers is crucial for polymerase chain reaction (PCR). Nonspecific primers will bind to unintended genes and result in nonspecific amplicons. MFEprimer is a program for checking the specificity of PCR primers against the background DNA.

In this protocol, we introduce:

  1. the factors that affect the specificity of primers;
  2. the principle of MFEprimer and its settings;
  3. how to use the MFEprimer to examine the specificity of primers.

For details, please download the PDF version.

Tutorial: MFEprimer-3.0 web server usage

Support browsers

Home page and settings

  • A. Enter the primer sequences , multiplex PCR primers supported. Allowed number of primer sequences: 1 (min) – 50 (max). If primers has degenerate bases, max 2 primers allowed. Input format 1): fasta format. The main purpose of this format is to help users to name each primers. The characters after “>” is the name of this fasta record ; 2): sequence-only format ; 3): Hybrid formats.
  • B. For receiving the results. If you have more than two primers , we suggest you leave your email.
  • C. Select the background database.
  • D. Allowed mismatch at the 3’ end, but exclude the first base at the 3’ end. This feature will make MFEprimer more sensitively and accurately, the price is slow.
  • E.Whether to output more details about bindingdatas.
  • F. Minimum Tm value required for the binding stability between primer and its binding sites.
  • G. products‘ sizes.
  • H. Concentration of monovalent cations (usually KCl) (default 50mM).
  • I. Concentration of divalent cations (usually MgCl2) (default 1.5mM).
  • J. Concentration of dNTPs (default 0.25mM).
  • K. Annealing oligo concentration (default 50nM).
  • L. Download the command-line tool.
  • M. Check the specificity of primers.
  • N. If users only need to view the information of the hairpin, click this link.
  • O. If users only need to view the information of the dimer, click this link.
  • P. If users want to customize the parameters to draw a virtual electrophotogram, click this link.
  • Q. If we missed databases of your interest, please click this link to tell us.
  • R. Show the background databases we included ( 258 now).

Result page and figures

  • A. When the result has finished, the icon will turn green, and users also could remember the links and check it within 10 days.
  • B. Show the primers information.
  • C. Show the histogram of Tm and △G of x primer bindings. (see Fig.1)
  • D. Show the primer ID.
  • E. Hairpin list.
  • F. Dimer list.
  • G. Histogram of x potential amplicons.
  • H. Download the amplicons result.
  • I. Download the binding result.
  • J. Show the histogram of every primer binding. (see Fig.2)
  • K. Download the image.
  • L. Compare different primer bindings.
  • A. Descriptions of x potential amplicons. Show the brief description of all the potential amplicons predicted by MFEprimer3.0. The amplicons in red are the ones that could be probably amplified in PCR.
  • B. Select “AmpID” then click “Virtual Electrophotogram” button to view virtual electrophotogram (see Fig.3)
  • C. Select “AmpID” then click “Sequence Alignment” button (see Fig.4)
  • D. Select “AmpID” then click “Output Amplicons” button.
  • E. Amplicon details. Information on the hybridization details for each predicted amplicon and the amplicon sequence.
  • F. See the complete amplicon sequence or download the sequence.

A. Show the parameters used during the evaluation process.

Tutorial: command-line tool usage

Download binaries [V3.0]

Command-line software: directory and files

├── bin/
├── mfeprimer
├── mfeprimer-index
├── mfeprimer-snp-format
├── mfeprimer-hairpin
├── mfeprimer-dimer
└── test/
├── genome.fa
├── snp.bed
└── test.fa

  • “mfeprimer” is the main program.
  • “mfeprimer-index” is used to index the background database sequences.
  • “mfeprimer-snp-format” is used to index dbSNP database file in bed format.
  • “mfeprimer-hairpin” is used to check hairpins of primers.
  • “mfeprimer-dimer” is used to check dimers of primers.
  • “genome.fa” is a reference genome sequence file for testing.
  • “snp.bed” is the dbSNP database for testing.
  • “test.fa” is a primer file for testing.


Step 1: Index file

./mfeprimer-index -i genome.fa
./mfeprimer-snp-format -in snp.bed -out snp.json

Step 2: Running MFEprimer

./mfeprimer -in test.fa -db genome.fa -out out.txt -dbSNP snp.json -bind -json


  • -bind : Output bindingdatas details, default is false.
  • -db (value) : Database for specificity check, multiple database supported: -db db1 -db db2.
  • -dbSNP (string) : A database includs SNP coordinate information, e.g. hg19.snps.json.
  • -diva (float) : Concentration of divalent cations [mM]. (default 1.5)
  • -dntp (float) : Concentration of dNTPs [mM]. (default 0.25)
  • -gz : Compress in .gz format, default is false.
  • -in (string) : [*] A file contains primer sequences in fasta format.
  • -json (string) : Output in json format, default is false.
  • -jsonCutoff (int) : Amplicons cutoff when output in json format, -1 will output all the amplicons. (default -1)
  • -kvalue (int) : K value for format. (default 9)
  • -maxSize (int) : Max product size for the predicted amplicons [bp]. (default 2000)
  • -mc (int) : Allowed maximum mismatch count.
  • -me (int) : Mismatch stoped from the ninth (default) base from 3′ end, should <= kvalue (default 9)-minSize int Min product size for the predicted amplicons [bp].-mono float Concentration of monovalent cations [mM]. (default 50)-ms int Mismatch started from the second (default) base from 3′ end, should >= 2 (default 2)
  • -oligo (float) : Concentration of annealing oligos [nM]. (default 50)
  • -out (string) : A file to store the results, default is screen.
  • -tm (float) : Tm cutoff value to filter the amplicons. (default 30)

Step 3: Results

  • “out.txt” is the result file, but there is no binding sites data.
  • out.txt.json is the result in json format.
  • “out.txt.binding” is the result of binding sites data.
  • “out.txt.binding.json” is the result of binding sites data in json format.

The contents of “out.txt” are as follows.

  • A. Details of primers.
  • B. Details of one potential hairpin.
  • C. Details of one potential dimer.
  • D. Descriptions of potential amplicons.
  • E. Details of one amplicon.
  • F. “*” indicates that there is an SNP here.

The contents of “out.txt.binding” are as follows

  • A. Details of binding sites.
  • B. Details of one primer binding sites.
  • C. Number of binding sites for this primer.

How to use results files in json format?

Take Golang language as an example.