Description Usage Arguments Value Examples
View source: R/plot_bootstrapped_contribution.R
Plot the signature contributions retrieved with 'fit_to_signatures_bootstrapped'. The function can plot both the absolute or the relative signature contribution. The graph can be plotted as either a jitter plot or as a barplot.
1 2 3 4 5 | plot_bootstrapped_contribution(
contri_boots,
mode = c("absolute", "relative"),
plot_type = c("jitter", "barplot", "dotplot")
)
|
contri_boots |
matrix showing signature contributions across bootstrap iterations. |
mode |
Either "absolute" for absolute number of mutations, or "relative" for relative contribution, default = "absolute" |
plot_type |
Either "jitter" for a jitter plot, "barplot" for a barplot, or "dotplot" for a dotplot |
A ggplot2 graph
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Get the bootstrapped signature contributions
## See 'count_indel_contexts()' for more info on how to do this.
contri_boots <- readRDS(system.file("states/bootstrapped_snv_refit.rds",
package = "MutationalPatterns"
))
## Plot bootstrapped contribution
plot_bootstrapped_contribution(contri_boots)
## Plot bootstrapped contribution with relative contributions
plot_bootstrapped_contribution(contri_boots, mode = "relative")
## Plot bootstrapped contribution with a barplot
plot_bootstrapped_contribution(contri_boots, plot_type = "barplot")
## Plot bootstrapped contribution with a dotplot
plot_bootstrapped_contribution(contri_boots, plot_type = "dotplot", mode = "absolute")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.