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 changesMigrate to the candidate API
Scope and timing
These are current candidate replacements, not a v1.0.0 compatibility promise. The 0.16.0–0.16.4 phases were delivered together in v0.16.5. The current installation tag is v0.16.6. The RC audit retains flexible parameter formats, spelling aliases, reexports and getter/export entry points without a new deprecation. Old calls in this table explain migration and must not be executed as current examples. Exact first-removal tags are not guessed where historical evidence gives only an upper bound.
Replacement table
| Old (do not run) | Current | Removal / guard | Meaning |
|---|---|---|---|
geom_ribbon() |
geom_link_ribbon() |
≤ 0.16.1 | Renamed link layer; not ggplot2::geom_ribbon(). |
ggchord(..., rotation = 20) |
ggchord(...) + coord_chord(rotation = 20) |
≤ 0.16.1 | Global coordinates are composed with +. |
geom_feature(feature_shape = "block", feature_width = .05) |
geom_feature(shape = "block", width = .05) |
0.16.1 | Mapped feature_shape is retained. |
geom_gene(gene_offset = c("+" = .1, "-" = .2)) |
geom_gene(position = position_strand(c("+" = .1, "-" = -.2))) |
0.16.1 | Explicit Position values are signed. |
geom_feature(feature_offset = .1) |
geom_feature(position = position_strand(.1)) |
0.16.1 | Use a Position object. |
geom_gene(gene_width = .05) |
geom_gene(width = .05) |
0.16.1 | Fixed geometry uses the shared width name. |
geom_link_ribbon(ribbon_gap = .01) |
geom_link_ribbon(link_gap = .01) |
0.16.1 | Use link_gap; likewise use link_ctrl_point. |
geom_gene_label_repel(gene_label_layout = "aligned") |
geom_gene_label_repel(label_layout = "auto") |
0.16.1 | Migrate both the name and value. |
geom_gene_label_repel(label_rotation = 90) |
geom_gene_label(label_rotation = 90) |
0.16.4 guard | Previously ignored manual control now errors; alternatively remove it. |
geom_feature_label_repel(label_orientation = "horizontal") |
geom_feature_label(label_orientation = "horizontal") |
0.16.4 guard | Use the fixed feature-label layer for unknown-strand features. |
geom_restriction_site(leader = "trunk") |
geom_restriction_site(leader = "radial") |
0.16.1 | The radial default remains. |
theme_ggchord(base_size = 10) |
theme_ggchord() + theme(text = element_text(size = 10)) |
≤ 0.16.1 | Text appearance belongs to theme elements. |
Run the replacement
In a fresh session, run this preparation before the current replacements:
Preparation code — run once on this page
Code
library(ggchord)
library(dplyr)
data(seq_data_example)
data(ribbon_data_example)
data(gene_data_example)
seqs <- seq_data_example |>
select(accver, length)
links <- ribbon_data_example |>
select(qaccver, saccver, qstart, qend, sstart, send)
# The fixture preserves biological strands separately from its old display strands.
genes <- gene_data_example |>
transmute(accver, start, end, strand = source_strand)
library(dplyr)
data(plasmid_example_pUC19)
plasmid_seq <- plasmid_example_pUC19 |>
select(accver, length)
feature_source <- find_common_features(plasmid_example_pUC19)
features <- feature_source |>
select(accver, start, end, strand, type, anno)Code
p_migrated <- ggchord(plasmid_seq) +
geom_seq() +
geom_feature(data = features, shape = "block", width = .05) +
geom_feature_label(data = features, label_rotation = 0) +
coord_circular()
p_offsets <- ggchord(seqs, gene_data = genes) +
geom_seq() +
geom_gene(position = position_strand(c("+" = .1, "-" = -.2)))Old minus-strand offset magnitudes need a negative sign in explicit Position values. Mapping still uses aes(feature_shape = type) with a shape scale; the fixed parameter is shape. Automatic labels use label_layout; manual geometry uses the corresponding fixed-label layer. label_layout = "aligned" becomes "auto". Removed names are errors, not silently retained execution paths.
What remains supported
The five colour/color spelling aliases, all upstream reexports, gene/feature/plasmid shortcuts and both geometry getter/export interfaces remain. Coordinate-specific defaults and already documented result fields are retained. See the API contract and current reference for NULL/NA/missing semantics; NULL does not universally mean disabled.