File: strand_occurrences.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 (46 lines) | stat: -rw-r--r-- 1,312 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/strand_occurrences.R
\name{strand_occurrences}
\alias{strand_occurrences}
\title{Count occurrences per base substitution type and strand}
\usage{
strand_occurrences(mut_mat_s, by = NA)
}
\arguments{
\item{mut_mat_s}{192 feature mutation count matrix, result from
'mut_matrix_stranded()'}

\item{by}{Character vector with grouping info, optional}
}
\value{
A data.frame with the total number of mutations and relative
contribution within group per base substitution type and strand
}
\description{
For each base substitution type and strand the total number
of mutations and the relative contribution within a group is returned.
}
\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"
))

## Load a reference genome.
ref_genome <- "BSgenome.Hsapiens.UCSC.hg19"
library(ref_genome, character.only = TRUE)

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

strand_counts <- strand_occurrences(mut_mat_s, by = tissue)
}
\seealso{
\code{\link{mut_matrix_stranded}},
\code{\link{plot_strand}},
\code{\link{plot_strand_bias}}
}