File: plot_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 (59 lines) | stat: -rw-r--r-- 1,618 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
48
49
50
51
52
53
54
55
56
57
58
59
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_strand_bias.R
\name{plot_strand_bias}
\alias{plot_strand_bias}
\title{Plot strand bias per base substitution type per group}
\usage{
plot_strand_bias(strand_bias, colors = NA, sig_type = c("fdr", "p"))
}
\arguments{
\item{strand_bias}{data.frame, result from strand_bias function}

\item{colors}{Optional color vector with 6 values for plotting}

\item{sig_type}{The type of significance to be used. Possible values:
* 'fdr' False discovery rate.
A type of multiple testing correction.;
* 'p' for regular p values.}
}
\value{
Barplot
}
\description{
Plot strand bias per base substitution type per group
}
\examples{
## See the 'mut_matrix_stranded()' example for how we obtained the
## following mutation matrix.
mut_mat_s <- readRDS(system.file("states/mut_mat_s_data.rds",
  package = "MutationalPatterns"
))


tissue <- c(
  "colon", "colon", "colon",
  "intestine", "intestine", "intestine",
  "liver", "liver", "liver"
)

## Perform the strand bias test.
strand_counts <- strand_occurrences(mut_mat_s, by = tissue)
strand_bias <- strand_bias_test(strand_counts)

## Plot the strand bias.
plot_strand_bias(strand_bias)

## Use multiple (max 3) significance cutoffs.
## This will vary the number of significance stars.
strand_bias_multistars <- strand_bias_test(strand_counts,
  p_cutoffs = c(0.05, 0.01, 0.005),
  fdr_cutoffs = c(0.1, 0.05, 0.01)
)
plot_strand_bias(strand_bias_multistars)
}
\seealso{
\code{\link{mut_matrix_stranded}},
\code{\link{strand_occurrences}},
\code{\link{strand_bias_test}}
\code{\link{plot_strand}}
}