geom_terminator() draws a 'T-shaped' glyph representing the position of a
transcription terminator.
Arguments
- mapping, data, stat, position, na.rm, show.legend, inherit.aes, ...
As standard for ggplot2. inherit.aes is set to FALSE by default, as terminators are not likely to share any plot aesthetics other than y.
- terminator_height
grid::unit()object giving the height of the vertical 'pillar' of the terminator glyph above the molecule line. Can be set as a negative value to draw terminators below the line. Defaults to 3 mm.- terminator_width
grid::unit()object giving the width of the horizontal 'beam' of the terminator glyph. Defaults to 3 mm.
Aesthetics
x (required; position of the terminator)
y (required; molecule)
alpha
color
linetype
linewidth (the former size aesthetic has been deprecated and will be removed in future versions)
Note that, unlike geom_gene_arrow() and ggplot2 convention, linewidth in
geom_terminator() is expressed in points rather than millimetres, with a
default value of 1. This inconsistency is retained for backwards
compatibility, and will be reconciled when these point-feature geoms are
superseded in gggenes 1.0.0.
Examples
ggplot2::ggplot(example_genes, ggplot2::aes(xmin = start, xmax = end,
y = molecule, fill = gene)) +
geom_gene_arrow() +
geom_terminator(data = example_terminators, ggplot2::aes(x = position, y = molecule)) +
ggplot2::facet_wrap(~ molecule, scales = "free")