File: plot_bootstrapped_contribution.Rd

package info (click to toggle)
r-bioc-mutationalpatterns 3.16.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,360 kB
  • sloc: sh: 8; makefile: 2
file content (47 lines) | stat: -rw-r--r-- 1,691 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_bootstrapped_contribution.R
\name{plot_bootstrapped_contribution}
\alias{plot_bootstrapped_contribution}
\title{Plot the bootstrapped signature contributions}
\usage{
plot_bootstrapped_contribution(
  contri_boots,
  mode = c("absolute", "relative"),
  plot_type = c("jitter", "barplot", "dotplot")
)
}
\arguments{
\item{contri_boots}{matrix showing  signature contributions across bootstrap iterations.}

\item{mode}{Either "absolute" for absolute number of mutations, or
"relative" for relative contribution, default = "absolute"}

\item{plot_type}{Either "jitter" for a jitter plot, "barplot" for a barplot, or "dotplot" for a dotplot}
}
\value{
A ggplot2 graph
}
\description{
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.
}
\examples{
## 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")
}