plot_river2: plot_river2

View source: R/RiverPlot.R

plot_river2R Documentation

plot_river2

Description

plot_river2 is modified version of plot_river from MutationalPatterns

Usage

plot_river2(
  mut_matrix,
  condensed = FALSE,
  UI = FALSE,
  is_normalized = FALSE,
  fontsize = 3,
  alt_colors = FALSE,
  FacetNames = NULL
)

Arguments

mut_matrix

Matrix containing mutation counts.

condensed

More condensed plotting format. Default = F.

UI

set to TRUE if ploting Uracilation Index Values

is_normalized

set to TRUE if the input data is normalized, to change labels

fontsize

font size of the text of the nucleotide/mutation labels

alt_colors

if set tot TRUE, alternative colors will be used

FacetNames

a character vector to be used for facet labels

name

description

Value

A ggplot object

References

https://genomemedicine.biomedcentral.com/articles/10.1186/s13073-018-0539-0

#' Plot a riverplot

Function to plot a SNV mutation matrix as a riverplot. This is especially useful when looking at a wide mutational context

See Also

mut_matrix, plot_96_profile, plot_profile_heatmap

Examples


## See the 'mut_matrix()' examples for how we obtained the
## mutation matrix information:
## Get regular matrix
mut_mat <- readRDS(system.file("states/mut_mat_data.rds",
  package = "MutationalPatterns"
))

## Create heatmap of profile
plot_river(mut_mat[,c(1,4)])

## Get extended matrix
mut_mat_extended <- readRDS(system.file("states/mut_mat_data_extended.rds",
  package = "MutationalPatterns"
))

## Create heatmap of extended profile
plot_river(mut_mat_extended[,c(1,4)])

## Create condensed version of riverplot
plot_river(mut_mat_extended[,c(1,4)], condensed = TRUE)


rayanramin/RamPack documentation built on Sept. 2, 2023, 1:20 a.m.