geom_wide_arc: A 'ggplot2' geom to draw arcs between genomic alignments.

View source: R/geom_wide_arc.R

geom_wide_arcR Documentation

A 'ggplot2' geom to draw arcs between genomic alignments.

Description

'geom_wide_arc()' draws wide polygons between two sets of start and end coordinates.

Usage

geom_wide_arc(
  mapping = NULL,
  data = NULL,
  geom = "polygon",
  stat = "wide_arc",
  position = "identity",
  n = 100,
  max.width = NULL,
  y.offset = 0,
  y.reverse = FALSE,
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

Arguments

mapping, data, stat, position, na.rm, show.legend, inherit.aes, ...

As is standard for ggplot2.

geom

The geometric object to use to display the data, either as a ggproto Geom subclass or as a string naming the geom stripped of the geom_ prefix (e.g. "point" rather than "geom_point")

n

The number of points to create for each alignment polygon (Default : '100').

max.width

The maximum width of the arc in y-coordinate units.

y.offset

The y-axis coordinate from where the arc will start.

y.reverse

Set to 'TRUE' if the arc orientation should be flipped upside down.

Details

This geom is intended to draws wide arc polygons between self-alignments defined in PAF format. Such alignments can be directly visualized using a wrapper function plotSelf. Input data is a data.frame object that contains required aesthetics 'x' and 'y' coordinates as well as 'group' field that is required in order to determine which coordinates represent a single alignment.

Aesthetics

'geom_wide_arc()' require or can take the following aesthetics (required aesthetics are in bold):

- **x** - **group** - y (if not defined it will set to zero) - color - linewidth - linetype - alpha - fill - size

Author(s)

David Porubsky

See Also

[plotSelf()]

Examples

## Create example data.frame to plot ##
## Each link between sequence region1 (seq1) and sequence region2 (seq2)
## is expected to have 4 x-coordinates (start.seq1, start.seq2, end.seq1, end.seq2)
plt.df <- data.frame(
    x = c(100, 500, 200, 1000),
    group = 1
)
## Make a plot
ggplot2::ggplot(plt.df) +
    geom_wide_arc(ggplot2::aes(x = x, group = group), alpha = 0.5)


daewoooo/SVbyEye documentation built on March 31, 2024, 8:58 a.m.