Skip to contents
0.16.6 documentation

Complete canonical API text; task articles explain the workflows. Tutorials

Site guide · find your task

Primers are slender directional arcs drawn between the two lines of a double sequence backbone by default, not arrows in the feature stack. Add geom_primer_label_repel() for the matching unboxed label and leader.

Usage

Code
geom_primer(
  mapping = NULL,
  data = NULL,
  side = c("between", "outside", "inside"),
  arc_offset = 0.045,
  arc_linewidth = 0.026,
  colour = "#A020F0",
  position = NULL,
  show.legend = FALSE,
  inherit.aes = FALSE,
  ...
)

Arguments

mapping, data

Standard layer inputs.

side

Backbone lane used by the primer arc. "between" uses the backbone centre line; "outside" and "inside" use arc_offset.

arc_offset

Distance from the backbone centre when side is "outside" or "inside".

arc_linewidth

Radial width of the primer arc.

colour

Primer arc colour.

position, show.legend, inherit.aes

Standard layer arguments.

...

Additional parameters passed to geom_feature().

Value

A ggplot2 layer.

Examples

Code
library(dplyr)
data(plasmid_example_pUC19)
seqs <- plasmid_example_pUC19 |>
  select(accver, length)
primers <- find_primer_bindings(plasmid_example_pUC19, set = "universal")
ggchord(seq_data = seqs) +
  geom_seq() +
  geom_primer(data = primers) +
  geom_primer_label_repel(data = primers) +
  coord_circular()