PlotMutationTypes: PlotMutationTypes

View source: R/firevat_plot.R

PlotMutationTypesR Documentation

PlotMutationTypes

Description

Plots a horizontal barplot of mutation types

Usage

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")
)

Arguments

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"))

Value

A ggplot object

Examples

## 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)

cgab-ncc/FIREVAT documentation built on Nov. 19, 2022, 5:55 p.m.