plot_signatures: Plots the mutational signatures

Description Usage Arguments Value Examples

View source: R/plotting.R

Description

After mutational signature discovery has been performed, this function can be used to display the distribution of each mutational signature. The color_variable and color_mapping parameters can be used to change the default color scheme of the bars.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot_signatures(
  result,
  legend = TRUE,
  plotly = FALSE,
  color_variable = NULL,
  color_mapping = NULL,
  text_size = 10,
  facet_size = 10,
  show_x_labels = TRUE,
  same_scale = TRUE
)

Arguments

result

A musica_result object generated by a mutational discovery or prediction tool.

legend

If TRUE, the legend for mutation types will be included in the plot. Default TRUE.

plotly

If TRUE, the the plot will be made interactive using plotly. Default FALSE.

color_variable

Name of the column in the variant annotation data.frame to use for coloring the mutation type bars. The variant annotation data.frame can be found within the count table of the musica object. If NULL, then the default column specified in the count table will be used. Default NULL.

color_mapping

A character vector used to map items in the color_variable to a color. The items in color_mapping correspond to the colors. The names of the items in color_mapping should correspond to the uniqeu items in color_variable. If NULL, then the default color_mapping specified in the count table will be used. Default NULL.

text_size

Size of axis text. Default 10.

facet_size

Size of facet text. Default 10.

show_x_labels

If TRUE, the labels for the mutation types on the x-axis will be shown. Default TRUE.

same_scale

If TRUE, the scale of the probability for each signature will be the same. If FALSE, then the scale of the y-axis will be adjusted for each signature. Default TRUE.

Value

Generates a ggplot or plotly object

Examples

1
2

musicatk documentation built on Nov. 8, 2020, 5:16 p.m.