PrimerEval: Primer Evaluation.

PrimerEvalR Documentation

Primer Evaluation.

Description

check_constraints

Determines whether a set of primers fulfills the constraints on the properties of the primers.

check_restriction_sites

Checks a set of primers for the presence of restriction sites. To reduce the number of possible restriction sites, only unambiguous restriction sites are taken into account and only common (typically used) restriction sites are checked if a common restriction site can be found in a sequence.

filter_primers

Filters a primer set according to the specified constraints such that all primers that do not fulfill the constraints are removed from the primer set.

primer_significance

Uses Fisher's exact test to determine the significance of a primer set according to its ratio of fulfilled constraints.

subset_primer_set

Determines subsets of the input primer set that are optimal with regard to the number of covered template sequences.

Usage

check_restriction_sites(
  primer.df,
  template.df,
  adapter.action = c("warn", "rm"),
  selected = NULL,
  only.confident.calls = TRUE,
  updateProgress = NULL
)

check_constraints(
  primer.df,
  template.df,
  settings,
  active.constraints = names(constraints(settings)),
  to.compute.constraints = active.constraints,
  for.shiny = FALSE,
  updateProgress = NULL
)

filter_primers(
  primer.df,
  template.df,
  settings,
  active.constraints = names(constraints(settings))
)

subset_primer_set(
  primer.df,
  template.df,
  k = 1,
  groups = NULL,
  identifier = NULL,
  cur.results.loc = NULL
)

primer_significance(primer.df, set.name = NULL, active.constraints = NULL)

Arguments

primer.df

A Primers object containing the primers whose properties are to be checked.

template.df

A Templates object containing the template sequences corresponding to primer.df.

adapter.action

The action to be performed when adapter sequences are found. Either "warn" to issue a warning about adapter sequences or "rm" to remove identified adapter sequences. Currently, only the default setting ("warn") is supported.

selected

Names of restriction sites that are to be checked. By default selected is NULL in which case all REBASE restriction sites are taken into account.

only.confident.calls

Whether only confident calls of restriction sites are returned. All restriction site call is considered confident if the restriction site is located in a region that does not match the template sequences. Note that this classification requires that the provided primers are somehow complementary to the provided templates. In contrast, non-confident restriction site calls are based solely on the primer sequences and do not take the templates into account, resulting in more false positive calls of restriction sites.

updateProgress

Progress callback function for shiny. The defaut is NULL meaning that no progress is monitored via the Shiny interface.

settings

A DesignSettings object containing the constraints that are to be considered.

active.constraints

A subset of the constraint identifiers provided by settings that are to be checked for fulfillment. By default active.constraints is NULL such that all constraints found in settings are evaluated. Otherwise, only the constraints specified via active.constraints that are available in settings are considered.

to.compute.constraints

Constraints that are to be computed. By default, to.compute.constraints is set to NULL such that all active.constraints are computed. If to.compute.constraints is a subset of active.constraints, all constraints specified via active.constraints are evaluated for fulfillment, but only the constraints in to.compute.constraints are newly calculated.

for.shiny

Whether the output of the function shall be formatted as HTML. The default setting is FALSE.

k

The spacing between generated primer subset sizes. By default, k is set to 1 such that all primer subsets are constructed.

groups

The identifiers of template groups according to which coverage should be determined. By default, groups is set to NULL such that all all covered templates are considered.

identifier

An identifier for storing the primer set. By default, identifier is set to NULL.

cur.results.loc

Directory for storing the results. By default, cur.results.loc is set to NULL, which means that no results are stored.

set.name

An identifier for the input primers. If NULL, the run identifier is used.

Details

When the optional argument active.constraints is supplied to check_constraints, only a subset of the constraints provided in settings is evaluated. Only constraints that are defined in settings can be computed. For a detailed description of all possible constraints and their options, please consider the ConstraintSettings documentation.

subset_primer_set determines optimal subsets of the input primer set by solving an integer-linear program. Since the quality of the primers (in terms of properties) is not taken into account when creating the subsets, this method should only be used for primer sets that are already of high quality.

primer_significance computes the significance by comparing the total count of fulfilled and failed constraints with the corresponding counts of primer sets from the literature. Significant p-values indicate primer sets whose rate of constraint fulfillment is higher compared to the reference sets.

Value

check_restriction_sites returns a data frame with possible restriction sites found in the primers.

check_constraints returns a Primers object that is augmented with columns providing the results for the evaluated constraints. The constraints_passed column indicates whether all active.constraints were fulfilled. The EVAL_* columns indicate the fulfillment of primer-specific constraints. The T_EVAL_* columns indicate the fulfillment of template-specific (e.g. coverage-based) constraints. For the coverage computations, columns prefixed by Basic_, indicate the results from string matching, while all other results (e.g. primer_coverage) indicate the expected coverage after applying the coverage constraints specified in settings. Columns prefixed by Off_ indicate off-target binding results.

filter_primers returns a Primers object containing only those primers fulfilling all specified constraints.

subset_primer_set returns a list with optimal primer subsets, each of class Primers.

primer_significance returns a numeric providing the p-value of the primer set according to Fisher's exact test. The returned value has the following attributes:

test

The results of the significance test

tab

The confusion matrix for Fisher's exact test

constraints

The names of the considered constraints

Note

Please note that some constraint computations may require the installation of additional programs; for more information please view the documentation of DesignSettings.

References

Roberts, R.J., Vincze, T., Posfai, J., Macelis, D. (2010) REBASE–a database for DNA restriction and modification: enzymes, genes and genomes. Nucl. Acids Res. 38: D234-D236. http://rebase.neb.com

Examples


data(Ippolito)
# Check the first primer for restriction sites with respect to the first 10 templates
site.df <- check_restriction_sites(primer.df[1,], template.df[1:10])

data(Ippolito)
settings.xml <- system.file("extdata", "settings", 
                 "C_Taq_PCR_high_stringency.xml", package = "openPrimeR")
settings <- read_settings(settings.xml)
# Check GC clamp and number of runs for all primers:
constraint.df <- check_constraints(primer.df, template.df, 
                     settings, active.constraints = c("gc_clamp", "no_runs"))
# Summarize the evaluation results
summary(constraint.df)

data(Ippolito)
filename <- system.file("extdata", "settings", 
             "C_Taq_PCR_high_stringency.xml", package = "openPrimeR")
settings <- read_settings(filename)
# Only retain the primers fulfilling the GC clamp constraint:
filtered.df <- filter_primers(primer.df, template.df, settings,
                 active.constraints = c("gc_ratio"))

# Determine optimal primer subsets
data(Ippolito)
primer.subsets <- subset_primer_set(primer.df, template.df, k = 3)

# Determine the significance of a primer set
data(Ippolito)
p.data <- primer_significance(primer.df, "Ippolito")
attr(p.data,"tab") # the confusion matrix
attr(p.data, "test") # results from Fisher's test
attr(p.data, "constraints") # considered constraints for the test

matdoering/openPrimeR documentation built on Feb. 11, 2024, 9:22 p.m.