At its core, comparing primer sets is based on the same functions as for analyzing individual primer sets. Therefore, we will now simply load several pre-evaluated sets of primers and their corresponding templates:
sel.sets <- c("Glas", "Rubinstein", "Persson", "Ippolito", "Scheid") primer.files <- list.files(path = system.file("extdata", "IMGT_data", "comparison", "primer_sets", "IGH", package = "openPrimeR"), pattern = "*\\.csv", full.names = TRUE) primer.data <- read_primers(primer.files) sel.idx <- unlist(lapply(sel.sets, function(x) grep(x, names(primer.data))[1])) primer.data <- primer.data[sel.idx] template.files <- rep(system.file("extdata", "IMGT_data", "comparison", "templates", "IGH_templates.csv", package = "openPrimeR"), length(primer.data)) template.data <- read_templates(template.files)
To compare the coverage of the templates that is afforded by each primer set, we can use plot_template_cvg()
:
sel.sets <- c("Glas", "Rubinstein", "Persson", "Ippolito", "Scheid") primer.files <- list.files(path = system.file("extdata", "IMGT_data", "comparison", "primer_sets", "IGH", package = "openPrimeR"), pattern = "*\\.csv", full.names = TRUE) primer.data <- read_primers(primer.files) sel.idx <- unlist(lapply(sel.sets, function(x) grep(x, names(primer.data))[1])) primer.data <- primer.data[sel.idx] template.files <- rep(system.file("extdata", "IMGT_data", "comparison", "templates", "IGH_templates.csv", package = "openPrimeR"), length(primer.data)) template.data <- read_templates(template.files)
# Plot the template coverage
plot_template_cvg(primer.data, template.data)
The plot shows that the primer sets from Glas and Ippolito outperform the other sets with respect to coverage. The sets from Person, Rubinstein, and Scheid seem to lack coverage of IGHV2. To gain a better understanding of the qualities of the individual primer sets, let's analyze the distribution of coverage events with regard to mismatches:
# Plot the template coverage with mismatches
plot_template_cvg(primer.data, template.data, per.mismatch = TRUE)
From the distribution of binding events with regard to mismatches, we see that the Ippolito has a favorable performance for few mismatches since the set guarantees high coverages already without introducing many mutations into the sequences. While the sets from Scheid and Glas perform similarly well for few mismatches, the sets from Persson and Rubinstein achieve high coverages only with many mismatches.
Apart from the coverage, the number of primers may be of concern since unnecessarily large sets may increase costs and be subject to primer-primer interactions. We can analyze the relationship between the percentage of covered templates and the size of the primer sets through plot_cvg_vs_set_size()
:
# Plot coverage vs size of primer set
plot_cvg_vs_set_size(primer.data, template.data)
The plot reveals that the primer sets from Persson, Rubinstein, and Ippolito have acceptable sizes and that the sets from Scheid and Glas may be prohibitively large. The plot also reveals to which degree the sets fulfill the constraints as the radii of the points indicate the degree of constraint fulfillment. Since the radii of the sets are quite similar there doesn't seem to be a big difference between the sets with respect to constraint fulfillment.
We'll now investigate which constraints are unsatisfied by using plot_constraint_fulfillment()
and determine the extent to which the constraints are broken using plot_constraint_deviation()
:
library(openPrimeR) xml.file <- system.file("extdata", "settings", "B_Taq_PCR_evaluate.xml", package = "openPrimeR") settings <- read_settings(xml.file) # don't consider specificity: we don't want to interpret this here .. constraints(settings) <- constraints(settings)[names(constraints(settings)) != "primer_specificity"] sel.sets <- c("Glas", "Rubinstein", "Persson", "Ippolito", "Scheid") primer.files <- list.files(path = system.file("extdata", "IMGT_data", "comparison", "primer_sets", "IGH", package = "openPrimeR"), pattern = "*\\.csv", full.names = TRUE) primer.data <- read_primers(primer.files) sel.idx <- unlist(lapply(sel.sets, function(x) grep(x, names(primer.data))[1])) primer.data <- primer.data[sel.idx] template.files <- rep(system.file("extdata", "IMGT_data", "comparison", "templates", "IGH_templates.csv", package = "openPrimeR"), length(primer.data)) template.data <- read_templates(template.files)
# Plot the constraint fulfillment and deviation
plot_constraint_fulfillment(primer.data, settings) plot_constraint_deviation(primer.data, settings)
Looking at the results, we can make the following findings:
In summary, the primers from Persson fulfill the constraints extremely well. The sets from Glas, Rubinstein, and Scheid may be problematic due to the high melting temperature deviations.
Finally, let us consider the regions where the primers bind in the templates. Since we've allowed for off-target binding events it's important to verify whether the primers bind close to the target region or not using plot_primer_binding_regions()
:
# Plot the binding positions of the primers
plot_primer_binding_regions(primer.data, template.data)
In this case, the blue region indicates the leader of the immunoglobulins, while the red region shows the variable exon region. Hence, the primers should start amplifying the templates at position 0 (the start of the exon) at the latest. However, this is not the case for all primer sets:
Considering all criteria, we would probably want to select the set from Ippolito for performing PCRs on the heavy chains of immunoglobulins due to the following reasons:
If you'd like to store the results of comparing the primer sets you can create a PDF report using create_report()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.