Complete canonical API text; task articles explain the workflows. Tutorials
Site guide · find your task
Setup and learning paths
HomeInstall and prepare the environmentChoose your learning moduleModule I · Chord
1.1 Tables and field meanings1.2 Produce and import comparisons1.3 Build the layers step by step1.4 Direction, curvature and clearance1.5 Filter and summarize links1.6 Full source-file workflow1.7 Complete chord showcaseModule II · Collinear
2.1 Reuse chord input tables2.2 Switch coordinates and add layers2.3 Routes, clearance and the ruler2.4 Compare CDS neighbourhoods2.5 Focus, anchors and segments2.6 Complete collinear showcaseModule III · Plasmid
3.1 DNA, annotations and 13 references3.2 From a circle to annotation layers3.3 Features, primers and restriction3.4 Thirteen plasmid references3.5 Complete plasmid casesConsult as needed · Data and layers
Prepare tables and coordinatesImport and convert dataImport nucleotide and protein alignmentsProject protein intervals to genomic coordinatesFeatures, stacking and genomic decorationLabels and local placementQuantitative tracksMappings, scales, guides and themesSet values by sequence and strandCommon adjustments and grammarExport, preview and diagnosticsLearning map and reference
Articles and complete workflowsFunction referenceReproducible galleryFrequently asked questionsMigrate to the candidate APITerminology and design sourcesDevelopment status and changesPrimers 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"usearc_offset.- arc_offset
Distance from the backbone centre when
sideis"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().
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()