pretty_lollipop_plot.Rd
Generates a visually appealing and interactive lollipop plot.
pretty_lollipop_plot(
maf_df,
gene,
plot_title,
plot_theme = "cbioportal",
out_name = paste0("my_lollipop_plot_", gene)
)
A data frame containing the mutation data (from a MAF).
The gene symbol to plot.
Optional (defaults to gene name).
Options: cbioportal(default), blue, simple, nature, nature2, ggplot2, and dark.
Optional, set the file name of the plot, if you export it to disk. Default name is my_lollipop_plot_gene.
Nothing.
This function is depending on a modified version of readMAF
from the g3viz
package.
Returned plot is interactive, meaning the user can hover over individual points in the plot to reveal more information.
The plot can also be exported in a variety of file formats inside the interactive view of the lollipop plot.
#get metadata (Fl and DLBCL)
metadata = get_gambl_metadata()
this_metadata = dplyr::filter(metadata, consensus_pathology %in% c("FL", "DLBCL"))
#get maf data for returned samples
maf = get_coding_ssm(limit_samples = this_metadata$sample_id,
seq_type = "genome")
#> reading from: /projects/nhl_meta_analysis_scratch/gambl/results_local/all_the_things/slms_3-1.0_vcf2maf-1.3/genome--projection/deblacklisted/augmented_maf/all_slms-3--grch37.CDS.maf
#> mutations from 1652 samples
#> after linking with metadata, we have mutations from 826 samples
#construct pretty_lollipop_plot.
pretty_lollipop_plot(maf_df = maf,
gene = "MYC",
plot_title = "Mutation data for MYC",
plot_theme = "nature2")
#> Factor is set to Mutation_Class
#> legend title is set to Mutation_Class