View source: R/plot_strand_bias.R
plot_strand_bias | R Documentation |
Plot strand bias per base substitution type per group
plot_strand_bias(strand_bias, colors = NA, sig_type = c("fdr", "p"))
strand_bias |
data.frame, result from strand_bias function |
colors |
Optional color vector with 6 values for plotting |
sig_type |
The type of significance to be used. Possible values: * 'fdr' False discovery rate. A type of multiple testing correction.; * 'p' for regular p values. |
Barplot
mut_matrix_stranded
,
strand_occurrences
,
strand_bias_test
plot_strand
## See the 'mut_matrix_stranded()' example for how we obtained the ## following mutation matrix. mut_mat_s <- readRDS(system.file("states/mut_mat_s_data.rds", package = "MutationalPatterns" )) tissue <- c( "colon", "colon", "colon", "intestine", "intestine", "intestine", "liver", "liver", "liver" ) ## Perform the strand bias test. strand_counts <- strand_occurrences(mut_mat_s, by = tissue) strand_bias <- strand_bias_test(strand_counts) ## Plot the strand bias. plot_strand_bias(strand_bias) ## Use multiple (max 3) significance cutoffs. ## This will vary the number of significance stars. strand_bias_multistars <- strand_bias_test(strand_counts, p_cutoffs = c(0.05, 0.01, 0.005), fdr_cutoffs = c(0.1, 0.05, 0.01) ) plot_strand_bias(strand_bias_multistars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.