plot_coverage: Plot coverage

View source: R/plot_coverage.R

plot_coverageR Documentation

Plot coverage

Description

Create a bar chart visualizing the average coverage across a given grouping variable. The color of each bar represents the magnitude of the mean coverage.

Usage

plot_coverage(data, group_by)

## S3 method for class 'cov_tbl'
plot_coverage(data, group_by)

## S3 method for class 'ref_alt_cov_tbl'
plot_coverage(data, group_by)

Arguments

data

A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr).

group_by

The grouping variable. The average coverage is computed for each unique value of the variable.

Value

A ggplot2 object.

Examples

# Read example data
data <- read_tbl_coverage(miplicorn_example("coverage_AA_table.csv"))

# Plot coverage grouped by gene
plot_coverage(data, gene)

bailey-lab/miplicorn documentation built on March 19, 2023, 7:40 p.m.