File: plot_signature_strand_bias.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 (45 lines) | stat: -rw-r--r-- 1,279 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_signature_strand_bias.R
\name{plot_signature_strand_bias}
\alias{plot_signature_strand_bias}
\title{Plot signature strand bias}
\usage{
plot_signature_strand_bias(signatures_strand_bias)
}
\arguments{
\item{signatures_strand_bias}{Signature matrix with 192 features}
}
\value{
Barplot
}
\description{
Plot strand bias per mutation type for each signature.
}
\examples{
## See the 'mut_matrix()' example for how we obtained the following
## mutation matrix.
mut_mat_s <- readRDS(system.file("states/mut_mat_s_data.rds",
  package = "MutationalPatterns"
))

## Extracting signatures can be computationally intensive, so
## we use pre-computed data generated with the following command:
# nmf_res_strand <- extract_signatures(mut_mat_s, rank = 2)

nmf_res_strand <- readRDS(system.file("states/nmf_res_strand_data.rds",
  package = "MutationalPatterns"
))

## Provide column names for the plot.
colnames(nmf_res_strand$signatures) <- c("Signature A", "Signature B")

## Creat figure
plot_signature_strand_bias(nmf_res_strand$signatures)

## You can also plot the bias of samples
plot_signature_strand_bias(mut_mat_s[, c(1, 2)])
}
\seealso{
\code{link{extract_signatures}},
\code{link{mut_matrix}}
}