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 changesDraws arcs (or straight lines, depending on the curvature setting) representing sequences in the chord diagram. Sequence layout parameters (order, orientation, radius, curvature, colors, etc.) are specified here.
Usage
Code
geom_seq(
mapping = NULL,
data = NULL,
seq_order = NULL,
seq_orientation = NULL,
seq_gap = NULL,
seq_radius = NULL,
seq_curvature = NULL,
seq_style = c("auto", "single", "double", "band"),
seq_backbone_gap = 0.025,
seq_backbone_width = 0.035,
linewidth = 0.9,
position = "identity",
show.legend = TRUE,
inherit.aes = FALSE,
...
)Arguments
- mapping
Default NULL (uses pre-computed data)
- data
Default NULL (retrieved automatically from the layout)
- seq_order
Optional character vector. Specifies the drawing order of sequences
- seq_orientation
Optional numeric (1 or -1). Sequence orientation, default 1
- seq_gap
Optional numeric. Gap proportion between sequences, default 0.03 in chord coordinates. In
coord_collinear(), a positive distance between consecutive backbones as a proportion of the longest backbone's width, default 0.3. The final sequence's gap is unused in linear layouts. Segmented linear displays measure it against the longest display row; windows in one row must request the same gap, and only gaps between rows affect vertical placement.- seq_radius
Optional numeric (> 0). Sequence arc radius, default 1.0
- seq_curvature
Optional numeric. Signed arc bow (0=straight, 1=standard arc, negative=opposite bow), default 1.0. Finite positive and negative values are accepted without clipping; magnitudes above 1 amplify the bow.
- seq_style
Backbone geometry.
"auto"uses a double backbone incoord_circular()and the historical single backbone incoord_chord().- seq_backbone_gap
Gap between double backbone lines.
- seq_backbone_width
Width of a band backbone.
- linewidth
Arc line width, default 0.9
- position, show.legend, inherit.aes
Standard ggplot2 layer arguments.
- ...
Additional fixed path aesthetics.
colour(orcolor) setsseq_colour. Explicit fixed values take precedence over matching mappings; omit fixed arguments to retain mapped styles.
