covBars: Construct an overall coverage cohort plot

Description Usage Arguments Value Examples

View source: R/covBars.R

Description

Given a matrix construct a plot to display sequencing depth acheived as percentage bars for a cohort of samples.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
covBars(
  x,
  colour = NULL,
  plot_title = NULL,
  x_title_size = 12,
  y_title_size = 12,
  facet_lab_size = 10,
  plotLayer = NULL,
  out = "plot"
)

Arguments

x

Object of class matrix with rows representing the sequencing depth (i.e. number of reads) and columns corresponding to each sample in the cohort and elements of the matrix

colour

Character vector specifying colours to represent sequencing depth.

plot_title

Character string specifying the title to display on the plot.

x_title_size

Integer specifying the size of the x-axis title.

y_title_size

Integer specifying the size of the y-axis title.

facet_lab_size

Integer specifying the size of the faceted labels plotted.

plotLayer

Valid ggplot2 layer to be added to the plot.

out

Character vector specifying the the object to output, one of "data", "grob", or "plot", defaults to "plot" (see returns).

Value

One of the following, a list of dataframes containing data to be plotted, a grob object, or a plot.

Examples

1
2
3
4
5
# Create data
x <- matrix(sample(100000,500), nrow=50, ncol=10, dimnames=list(0:49,paste0("Sample",1:10)))

# Call plot function
covBars(x)

GenVisR documentation built on Dec. 28, 2020, 2 a.m.