Learn R Programming

h5vc (version 2.6.3)

plotMutationSpectrum: Plotting a mutation spectrum

Description

This function generates a mutation spectrum plot from a mutation spectrum returned by a call to mutationSPectrum

Usage

plotMutationSpectrum( ms, plotCounts = TRUE )

Arguments

ms
A mutation spectrum as returned by mutationSpectrum
plotCounts
Boolean flag specifying whether ms contains one row per variant (default) or already contains summarized counts per type of mutation

Value

  • A ggplot object containing the mutation spectrum plot

Details

The plot is inspired by the one shown in figure 1b of Signatures of mutational processes in human cancer -- Alexandrov et. al.

Examples

Run this code
library(h5vc)
  tallyFile <- system.file( "extdata", "example.tally.hfs5", package = "h5vcData" )
  data( "example.variants", package = "h5vcData" )
  plotMutationSpectrum( mutationSpectrum( variantCalls, tallyFile, "/ExampleStudy" ) )

Run the code above in your browser using DataLab