Skip to contents
Chapters and reference

Module I · Multi-sequence relationships · Section 13 of 16

1.12 Radial: synteny spokes

Download R scriptIncludes preparation and every page step. File examples need the input bundle; preview and save calls are retained.
On this page

1 Proportional radial spokes

The bundled four-sequence data retain their original lengths and CDS strands. This explicit display filter selects observed HSPs of at least 900 bp and 75 percent identity, taking the two longest per directed pair. The count track counts those selected query-start observations, not inferred depth or coverage.

R · Example code
library(dplyr)
comparison_data <- flagship_comparison_example$comparison
radial_seqs <- comparison_data$seq_data
radial_hsp <- comparison_data$links
radial_features <- comparison_data$features
radial_events <- comparison_data$events
R · Example code
p_viewradial <- ggchord(radial_seqs, radial_hsp, feature_data = radial_features) +
  geom_seq() +
  geom_link_ribbon(link_avoid = "smooth") +
  geom_feature(shape = "arrow", width = 0.025, position = position_strand(0.05)) +
  geom_seq_label(seq_label_orientation = "horizontal") +
  geom_track(
    data = radial_events, geom = "bar",
    track = position_track("hsp-count", width = unit(3, "mm"))
  ) +
  coord_radial_synteny(start_angle = 90, inner_radius = 0.7)
view_ggchord(p_viewradial, width = 10, height = 9, units = "in")
Four real sequences with proportional spokes, source-strand CDS, observed interval ribbons and counts of retained HSP-start observations. Cyclic adjacency selects existing relationships only.
Four real sequences with proportional spokes, source-strand CDS, observed interval ribbons and counts of retained HSP-start observations. Cyclic adjacency selects existing relationships only. · Open full-resolution figure

Spoke order comes from geom_seq(seq_order=...). Default lengths are proportional; length_mode="equal" explicitly normalizes display lengths while preserving source coordinates. start_angle is measured counterclockwise from positive x; clockwise controls spoke order, not source strand. Positive feature/track offsets point counterclockwise from an outward spoke. Physical Track widths and source statistics reuse the shared band and Stat system.

Cyclic neighbors include the last/first pair only when an HSP exists. Without that relationship its channel stays empty. N=2 draws each source row once; N=1 is rejected. Reverse HSPs retain full ordered interval fronts and twists. New Radial fronts use inclusive interval boundaries [min-1,max], so a one-position HSP has nonzero width; axis positions stay one-based. Existing views retain their own documented interval conventions. The hole is display spacing, not deleted sequence. Sequence names sit beyond the outer tips.

Data preparation and settings (expand)
R · Example code
comparison <- ggchord(radial_seqs, radial_hsp, feature_data = radial_features) +
  geom_seq() +
  geom_seq_label() +
  geom_link_ribbon(adjacent_only = FALSE) +
  geom_feature(shape = "arrow", width = 0.025)
p_coursechord <- comparison + coord_chord()
p_courselinear <- comparison + coord_collinear()
p_courseradial <- comparison + coord_radial_synteny()
p_coursesankey <- comparison + coord_sankey()
R · Example code
p_courseradialangle <- p_courseradial +
  coord_radial_synteny(start_angle = 45)
view_ggchord(p_courseradialangle, width = 10, height = 8, units = "in")
Change only the first-spoke angle

Ribbons can select nonneighbors with explicit pairs or adjacent_only=FALSE. Nonneighbor point links need between; named A–B–A instances use the same unambiguous routing contract. User control points use final x/y coordinates. Endpoint gradients and subject tips remain explicit options; default ribbons retain Identity fills.

2 Export and reverse-map

R · Example code
radial_layout <- export_ggchord_layout(p_viewradial, original_data = TRUE)
radial_location <- map_ggchord_position(p_viewradial, radial_seqs$accver[1], 1000)
radial_roundtrip <- map_ggchord_position(
  p_viewradial, radial_seqs$accver[1], radial_location[c("x", "y")], inverse = TRUE
)
radial_roundtrip

Exports retain radial_frames, original source intervals and projected complete fronts in radial_endpoints, plus connection selection, instance routing, track statistics and label visibility. Radial inverse mapping requires both x and y on the selected backbone. This avoids inventing a position from a single x value shared by multiple spokes. Focus/segment inputs retain source origins; radial display does not join multiple windows onto one spoke.

3 Usage and boundaries

Change only start_angle and verify source coordinates and directions. N=1, shared branches, circular-only layers and stitching separate windows into one spoke are unsupported. Inverse mapping needs backbone x/y.

4 Nonadjacent outlines and outward lift

In final cyclic order, neighbouring ribbons (including first/last) remain solid. Non-neighbours use dashed outlines with the same 0.4 mm width as Collinear. nonadjacent_linewidth=0 restores ordinary widths; explicit line types, width mappings and user scales take priority.

nonadjacent_bulge sets outward lift for nonadjacent annular paths, default 0. Positive values also increase lift as needed to clear full intervening spokes and separate same-channel ribbon bands. The longest proportional spoke has length 2; 0.2 below is in display layout units, not bp. Endpoints, source coordinates and interval widths remain intact; crossings required by endpoint order may remain.

R · Example code
ggchord(radial_seqs, radial_hsp) +
  geom_seq() +
  geom_link_ribbon(adjacent_only = FALSE) +
  coord_radial_synteny(nonadjacent_bulge = 0.2)

For per-row manual adjustments, link_ctrl_point accepts Cartesian controls for the two edges and takes priority over automatic lift; it changes the annular path shape. link_gap only controls clearance near sequence endpoints and cannot replace midpoint lift.

Search documentation

↑ ↓ select · Enter open · Esc close; or browse by task. API and functions