plot_correlation_bootstrap {MutationalPatterns} | R Documentation

## Plots the correlation between bootstrapped signature contributions

### 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

    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

    ## 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)

[Package MutationalPatterns version 3.0.1 Index]