Description Usage Arguments Value Examples
View source: R/plot_correlation_bootstrap.R
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.
1 | plot_correlation_bootstrap(contri_boots, per_sample = TRUE)
|
contri_boots |
A dataframe with bootstrapped signature contributions. |
per_sample |
Whether or not a plot should be made per sample. Default: TRUE. |
A list of ggplot2 objects if run per sample. Else it returns a single ggplot2 object.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.