plot_mbs_contexts: Plot the MBS contexts

Description Usage Arguments Details Value See Also Examples

View source: R/plot_mbs_contexts.R

Description

Plot the MBS contexts

Usage

1
plot_mbs_contexts(counts, same_y = TRUE)

Arguments

counts

A tibble containing the number of MBS per MBS length.

same_y

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

Details

Plots the number of MBS per MBS length per sample. It takes a tibble with counts as its input. This tibble can be generated by count_mbs_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_mbs_contexts

Other MBS: count_mbs_contexts(), plot_compare_mbs()

Examples

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

## Plot contexts
plot_mbs_contexts(mbs_counts)

## Use a different y axis for all samples.
plot_mbs_contexts(mbs_counts, same_y = FALSE)

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