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 changesPlaces sequence labels at the midpoint of each sequence arc, radially offset from the arc. Labels can be styled via their radial offset, rotation, font size, text orientation and justification.
Usage
Code
geom_seq_label(
mapping = NULL,
data = NULL,
seq_label_radius = 1,
seq_label_rotation = NULL,
labels = NULL,
seq_label_orientation = c("arc", "horizontal"),
seq_label_hjust = NULL,
seq_label_vjust = NULL,
check_overlap = FALSE,
position = "identity",
show.legend = FALSE,
inherit.aes = FALSE,
...
)Arguments
- mapping
Default NULL (uses pre-computed data)
- data
Default NULL (retrieved automatically from the layout)
- seq_label_radius
Optional numeric/vector. Radial position of the labels as a multiplier of the sequence arc radius:
1is on the arc,> 1places the label outside (away from the chord center) and< 1places it inside, default 1 Explicit values are incompatible withcoord_collinear(), which places sequence labels beside the left endpoint of each horizontal track.- seq_label_rotation
Optional numeric/vector. Additional label rotation (degrees) on top of the arc-aligned orientation, default NULL (0). Ignored when
seq_label_orientation = "horizontal".- labels
Optional character vector. Override the label texts (defaults to the sequence labels from
geom_seq()or the sequence IDs)- seq_label_orientation
Character, default "arc". Label text orientation:
"arc"rotates the text along the sequence arc (and keeps it readable),"horizontal"draws every label horizontally, extending away from the chord center.- seq_label_hjust
Optional numeric/vector. Horizontal justification of the labels, default NULL. The default arc orientation uses -0.2 so the text sits just inside the sequence; with
seq_label_orientation = "horizontal"the justification is chosen automatically so the text extends away from the chord center.- seq_label_vjust
Optional numeric/vector. Vertical justification of the labels, default NULL (0.5).
- check_overlap
Logical, default FALSE. When TRUE, labels that would overlap a previously drawn label are skipped (ggplot2's
geom_text()option).- position, show.legend, inherit.aes
Standard ggplot2 layer arguments.
- ...
Additional arguments passed to
geom_text()
