Skip to contents
0.16.6 documentation

Complete canonical API text; task articles explain the workflows. Tutorials

Site guide · find your task

Adds two short diagonal strokes at each truncated sequence end in coord_collinear(). Metadata returned by focus_ggchord_data() determines the truncated genomic ends; reversed sequence orientation moves each mark to the corresponding displayed end. These marks are decorations and do not change the source sequence or feature coordinates.

Usage

Code
geom_seq_break(
  mapping = NULL,
  data = NULL,
  break_width = 0.02,
  break_height = 0.04,
  linewidth = 0.4,
  colour = "#3D4348",
  position = "identity",
  show.legend = FALSE,
  inherit.aes = FALSE,
  ...
)

Arguments

mapping, data

Standard layer mapping and sequence data. By default, use the plot's sequence table. Truncation is read from .truncated_left/.truncated_right, with source interval and length metadata as fallback when available.

break_width, break_height

Width and height of the complete break mark in linear layout units. These are layout distances, not millimetres.

linewidth, colour

Fixed line appearance. Ordinary visual aesthetics can also be mapped and controlled by their ggplot2 scales.

position, show.legend, inherit.aes

Standard ggplot2 layer arguments.

...

Additional parameters passed to ggplot2::geom_path().

Value

A ggplot2 layer. Other ggchord coordinate systems are unsupported.

Examples

Code
library(dplyr)
data(seq_data_example)
seqs <- seq_data_example |>
  select(accver, length)
loci <- tibble(
  accver = seqs$accver, start = floor(seqs$length * .25),
  end = floor(seqs$length * .75)
)
focused <- focus_ggchord_data(seqs, loci = loci)
ggchord(seq_data = focused$seq_data) +
  geom_seq() +
  geom_seq_break() +
  coord_collinear()