plot_profile_region: Plot 96 trinucleotide profile per subgroup

View source: R/plot_profile_region.R

plot_profile_regionR Documentation

Plot 96 trinucleotide profile per subgroup

Description

Plot relative contribution of 96 trinucleotides per subgroup. This can be genomic regions but could also be other subsets. The function uses a matrix generated by 'lengthen_mut_matrix()' as its input.

Usage

plot_profile_region(
  mut_matrix,
  mode = c("relative_sample", "relative_sample_feature", "absolute"),
  colors = NULL,
  ymax = 0.2,
  condensed = FALSE
)

Arguments

mut_matrix

Mutation matrix

mode

'relative_sample', 'relative_sample_feature' or 'absolute' When 'relative_sample', the number of variants will be shown divided by the total number of variants in that sample. When 'relative_sample_feature', the number of variants will be shown divided by the total number of variants in that sample. and genomic region.

colors

6 value color vector

ymax

Y axis maximum value, default = 0.2

condensed

More condensed plotting format. Default = FALSE.

Value

96 trinucleotide profile plot per region

See Also

mut_matrix

Other genomic_regions: bin_mutation_density(), lengthen_mut_matrix(), plot_spectrum_region(), split_muts_region()

Examples

## See the 'lengthen_mut_matrix()' example for how we obtained the
## mutation matrix information:
mut_mat_long <- readRDS(system.file("states/mut_mat_longregions.rds",
  package = "MutationalPatterns"
))

## Plot the 96-profile of three samples
plot_profile_region(mut_mat_long[, c(1, 4, 7)])

CuppenResearch/MutationalPatterns documentation built on Nov. 23, 2022, 4:13 a.m.