Make a line plot showing values across different regions

makeLinePlot(
  obj,
  gr = NULL,
  window.size = 5,
  group = NULL,
  group.colors = NULL,
  group.label = "",
  method = "mean",
  plot.average.of.groups = FALSE,
  avg.color = "red",
  show.x.ticks = FALSE,
  ylab = "",
  remove.chr.prefix = TRUE,
  verbose = F
)

Arguments

obj

scCNVis object

gr

A GenomicRanges::GRanges object specifying which regions to plot. If NULL, all regions will be plotted. Default = NULL

window.size

Window size for moving average calculation

group

Name of metadata column to group lines by. Default = NULL

group.colors

Named character vector. Names should be the values in the column specified by 'group', values are the colors. Default = NULL

group.label

The label to be used for the groups. Default = ""

method

Method for aggregating values across a group. Should be "mean", "median", "sd" or "range". Default = "mean"

plot.average.of.groups

Logical. If TRUE, plot each cluster individually and an additional line representing the average of each cluster. Default = FALSE

avg.color

Color. Used for the color of the cluster average, if plot.average.of.clusters == T. Default = 'red'

show.x.ticks

Logical. If TRUE, show tick marks on X axis. Only recommended when showing smaller regions. Default = FALSE

ylab

Character. Label of y axis. Default = ""

remove.chr.prefix

Remove 'chr' prefix of chromosome names. Default = TRUE

verbose

Verbose logging. Default = FALSE

Value

Returns a list containing "Plot" (ggplot) and "PlotData" (data.frame)