| PlotMutationTypes | R Documentation |
Plots a horizontal barplot of mutation types
PlotMutationTypes(
mutation.types = c("C>A", "C>G", "C>T", "T>A", "T>C", "T>G"),
mutation.types.values,
mutation.types.colors,
max.y.val,
title,
convert.to.percentage = T,
show.legend = T,
font.size.small = 8,
font.size.med = 14,
plot.margin = unit(c(0.5, 0.5, 0.5, 0.5), "cm")
)
mutation.types |
Mutation types; Default = c("C>A", "C>G", "C>T", "T>A", "T>C", "T>G") |
mutation.types.values |
Mutation count for each mutation type |
mutation.types.colors |
A color vector for indicating mutation types |
max.y.val |
y axis maximum value |
title |
Plot title |
convert.to.percentage |
if True convert y values to percentage (x 100); Default = T |
show.legend |
If True, show legend; Default = T |
font.size.small |
Small font size; Default = 8 |
font.size.med |
Medium font size; Default = 14 |
plot.margin |
Margin vector for drawing plot; Default = unit(c(0.5, 0.5, 0.5, 0.5), "cm")) |
A ggplot object
## Not run:
p <- PlotMutationTypes(mutation.types = c("C>A", "C>G", "C>T", "T>A", "T>C", "T>G"),
mutation.types.values = c(0.3, 0.3, 0.1, 0.1, 0.1, 0.1),
mutation.types.colors = TriNuc.Mutation.Type.Hex.Colors,
max.y.val = 0.5,
convert.to.percentage = T,
show.legend = T,
font.size.small = 8,
font.size.med = 14,
plot.margin = unit(c(0.5, 0.5, 0.5, 0.5), "cm"))
print(p)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.