plot_main_dbs_contexts: Plot the main DBS contexts

Description Usage Arguments Details Value See Also Examples

View source: R/plot_main_dbs_contexts.R

Description

Plot the main DBS contexts

Usage

1
plot_main_dbs_contexts(counts, same_y = FALSE)

Arguments

counts

A tibble containing the number of DBS per COSMIC context.

same_y

A boolean describing whether the same y axis should be used for all samples.

Details

Plots the number of DBS per main COSMIC context per sample. The contexts are only divided by REF and not by ALT. It takes a tibble with counts as its input. This tibble can be generated by count_dbs_contexts Each sample is plotted in a separate facet. The same y axis can be used for all samples or a separate y axis can be used.

Value

A ggplot figure.

See Also

count_dbs_contexts, plot_dbs_contexts

Other DBS: count_dbs_contexts(), get_dbs_context(), plot_compare_dbs(), plot_dbs_contexts()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Get The dbs counts
## See 'count_dbs_contexts()' for more info on how to do this.
dbs_counts <- readRDS(system.file("states/blood_dbs_counts.rds",
  package = "MutationalPatterns"
))

## Plot contexts
plot_main_dbs_contexts(dbs_counts)

## Use the same y axis for all samples.
plot_main_dbs_contexts(dbs_counts, same_y = TRUE)

MutationalPatterns documentation built on Nov. 14, 2020, 2:03 a.m.