plot_ranges: Plot variants in a region

View source: R/plot_ranges.R

plot_rangesR Documentation

Plot variants in a region

Description

A simple ggplot2 representation of variants in a region. The beginning of the variant is represented as a point (shape=SV type). The point is annotated with the variant size. A line outlines the range (e.g. for deletions or inversions).

Usage

plot_ranges(
  gr.l,
  region.gr = NULL,
  pt.size = 2,
  lab.size = 4,
  maxgap = 20,
  scale.legend = "auto",
  show.svids = TRUE,
  gr.l.2 = NULL,
  run.names = c("run1", "run2")
)

Arguments

gr.l

a list of GRanges. If named, the names are used as colors in the graph.

region.gr

the region of interest. If NULL (default), all variants are displayed.

pt.size

the point (and line) sizes. Default is 2.

lab.size

the label size. Default is 4

maxgap

the maximum gap allowed when filtering variants in regions. Default is 20.

scale.legend

the size of the scale legend at the bottom. 0 to switch off. Default is 'auto'.

show.svids

should the SV ids be shown on the y-axis. Default is TRUE

gr.l.2

(Optional) a second list of GRanges, like gr.l but from another run for example. If provided the graph will show a second panel for this run (change names with run.names=.

run.names

names to use for the panels when a second input, gr.l.2, is provided. Vector of two characters.

Value

a ggplot2 object

Author(s)

Jean Monlong


jmonlong/sveval documentation built on July 31, 2023, 7:50 p.m.