plot_correlation_bootstrap: Plots the correlation between bootstrapped signature...

Description Usage Arguments Value Examples

View source: R/plot_correlation_bootstrap.R

Description

This function plots the pearson correlation between signatures. This can be done per sample or for all samples together. It returns a list of the created figures.

Usage

1
plot_correlation_bootstrap(contri_boots, per_sample = TRUE)

Arguments

contri_boots

A dataframe with bootstrapped signature contributions.

per_sample

Whether or not a plot should be made per sample. Default: TRUE.

Value

A list of ggplot2 objects if run per sample. Else it returns a single ggplot2 object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Get a dataframe with bootstrapped signature contributions.
## See 'fit_to_signatures_bootstrapped()' for how to do this.
contri_boots <- readRDS(system.file("states/bootstrapped_snv_refit.rds",
  package = "MutationalPatterns"
))

## Plot the correlations between signatures per sample
fig_l <- plot_correlation_bootstrap(contri_boots)

## Look at the figure of the first sample.
fig_l[[1]]

## You can also look at the correlation for all samples combined
plot_correlation_bootstrap(contri_boots, per_sample = FALSE)

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