plot_mutations_in_flanked_sites: Visualize mutations in sites and flanks

View source: R/plotting_mutation_patterns.R

plot_mutations_in_flanked_sitesR Documentation

Visualize mutations in sites and flanks

Description

Barplot of mutations along relative positions to site midpoints

Usage

plot_mutations_in_flanked_sites(
  dfr,
  window_size = 100,
  what_plot = "mut_freq",
  y_range = NULL
)

Arguments

dfr

Data frame of mutation counts at relative positions along stacked sites/flanks (from get_mutations_in_flanked_sites)

dist

relative position of mutations

mut_count

number of mutations at relative position

is_site

boolean indicating whether the relative position is within the site

mut_freq

frequency of mutations, calculated as mut_count / n_patients / total bp * 1e6 by get_mutations_in_flanked_sites

window_size

Integer indicating the half-width of sites and flanking regions (added to both sides of midpoint)

what_plot

Character indicating y-axis variable (default "mut_freq")

y_range

Numeric y-axis limits (default NULL)

Value

ggplot object


reimandlab/RM2 documentation built on Aug. 13, 2022, 12:22 p.m.