# Run primer design

Run primer design

    design(seqOpts, primerOpts = NULL, returnStats = TRUE, ...)

## Arguments

seqOpts | parameters for the given sequence, i.e. template sequence, its name, junction position
primerOpts | (optional) thermodynamical and other primer-specific parameters. Can be created using p3Settings.
returnStats | (default: TRUE) if the "EXPLAIN" fields with the run statistics should be returned. This option overwrites the one provided in the `primerOpts$PRIMER_EXPLAIN_FLAG`.
... | path parameters for the `runPrimer3` call.

## Value

a data.frame with the designed primers

## Details

By default, if `primer3Config` is not secified/NULL, it is inferred on the basis of the `primer3Path` as a subdirectory `primer3_config`

## Examples

    # make up a sequence
    seq1 <- paste(c("A", "T", "G", "C")[sample(4, 300, replace = TRUE)],
                  collapse = "")
    seqOpts <- seqSettings(seqId = "seq1", seq = seq1)
    res <- design(seqOpts)
    res$primers#>   PRIMER_PAIR_PENALTY PRIMER_LEFT_PENALTY PRIMER_RIGHT_PENALTY
    #> 0            0.039002            0.026532             0.012470
    #> 1            0.041723            0.029253             0.012470
    #> 2            0.085786            0.073316             0.012470
    #> 3            0.101563            0.026532             0.075031
    #> 4            0.104284            0.029253             0.075031
    #>   PRIMER_LEFT_SEQUENCE PRIMER_RIGHT_SEQUENCE PRIMER_LEFT PRIMER_RIGHT
    #> 0 AGGGAATGTTGCAAGTGGAC  TTCTAGACCACTCGCCGACT       26,20       260,20
    #> 1 GTTGCAAGTGGACCCCTTTA  TTCTAGACCACTCGCCGACT       33,20       260,20
    #> 2 ATCTGGACGAGGGAATGTTG  TTCTAGACCACTCGCCGACT       17,20       260,20
    #> 3 AGGGAATGTTGCAAGTGGAC  GCCTATCCGGGTTCTAGACC       26,20       271,20
    #> 4 GTTGCAAGTGGACCCCTTTA  GCCTATCCGGGTTCTAGACC       33,20       271,20
    #>   PRIMER_LEFT_TM PRIMER_RIGHT_TM PRIMER_LEFT_GC_PERCENT PRIMER_RIGHT_GC_PERCENT
    #> 0         59.973          60.012                 50.000                  55.000
    #> 1         59.971          60.012                 50.000                  55.000
    #> 2         59.927          60.012                 50.000                  55.000
    #> 3         59.973          59.925                 50.000                  60.000
    #> 4         59.971          59.925                 50.000                  60.000
    #>   PRIMER_LEFT_SELF_ANY_TH PRIMER_RIGHT_SELF_ANY_TH PRIMER_LEFT_SELF_END_TH
    #> 0                    0.00                     0.00                    0.00
    #> 1                    0.00                     0.00                    0.00
    #> 2                    0.00                     0.00                    0.00
    #> 3                    0.00                     0.00                    0.00
    #> 4                    0.00                     0.00                    0.00
    #>   PRIMER_RIGHT_SELF_END_TH PRIMER_LEFT_HAIRPIN_TH PRIMER_RIGHT_HAIRPIN_TH
    #> 0                     0.00                   0.00                    0.00
    #> 1                     0.00                   0.00                    0.00
    #> 2                     0.00                   0.00                    0.00
    #> 3                     0.00                   0.00                   46.61
    #> 4                     0.00                   0.00                   46.61
    #>   PRIMER_LEFT_END_STABILITY PRIMER_RIGHT_END_STABILITY PRIMER_PAIR_COMPL_ANY_TH
    #> 0                    7.9000                     8.1000                     1.72
    #> 1                    6.3000                     8.1000                     1.72
    #> 2                    7.0000                     8.1000                     0.00
    #> 3                    7.9000                     7.6000                     0.00
    #> 4                    6.3000                     7.6000                     0.00
    #>   PRIMER_PAIR_COMPL_END_TH PRIMER_PAIR_PRODUCT_SIZE
    #> 0                     0.00                      235
    #> 1                    11.96                      228
    #> 2                     0.00                      244
    #> 3                     0.00                      246
    #> 4                     0.00                      239