-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplot_mutation_frequency.Rd
47 lines (42 loc) · 1.36 KB
/
plot_mutation_frequency.Rd
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/mutation-frequency.R
\name{plot_mutation_frequency}
\alias{plot_mutation_frequency}
\alias{autoplot.mut_freq}
\alias{plot.mut_freq}
\title{Plot frequency of mutations}
\usage{
plot_mutation_frequency(data)
\method{autoplot}{mut_freq}(object, ...)
\method{plot}{mut_freq}(x, ...)
}
\arguments{
\item{data, object, x}{An object of class \code{mut_freq}. Derived from the output
of \code{\link[=mutation_frequency]{mutation_frequency()}}.}
\item{...}{Other arguments passed to specific methods.}
}
\value{
A \link[ggplot2:ggplot2-package]{ggplot2} object.
}
\description{
Plot the frequency of mutations generated by \code{\link[=mutation_frequency]{mutation_frequency()}}.
The frequency is plotted on the y-axis and the amino acid change is plotted
on the x-axis. Data are grouped by the gene on which the mutation took place
and coloured according to their groupings.
}
\examples{
# Read example data
data <- read_tbl_ref_alt_cov(
miplicorn_example("reference_AA_table.csv"),
miplicorn_example("alternate_AA_table.csv"),
miplicorn_example("coverage_AA_table.csv"),
gene == "atp6" | gene == "crt"
)
# Compute the mutation frequency
frequency <- mutation_frequency(data, 5)
# Plot
plot(frequency)
}
\seealso{
\code{\link[=mutation_frequency]{mutation_frequency()}} for generating the data for plotting.
}