R/generateSingleRibbonPlot.R
generateRibbonPlot.Rd
This function provides an alternate visualization for maftools::somaticInteractions()
generateRibbonPlot(
maf,
onco_genes = NULL,
save_name = NULL,
pval_high = 0.1,
pval_low = 0.05,
plot_type = "matrix",
plot_frac_mut_axis = TRUE,
rotate_plot_degrees = 0,
shrink_factor = 1.3,
scale_ribbon_to_fracmut = TRUE,
sig_colors = NULL,
gene_colors = NULL
)
A MAF object
A list of genes to restrict the analysis. Passed to maftools::somaticInteractions()
The name and path of the output PDF
All interactions with less than this p-value will be shown
Links with p-value less than this will be shown in a darker color
'ribbon' returns a customized chord diagram, 'matrix' returns the default somaticInteractions() plot
Whether or not to draw a numerical axis on the perimeter
Rotate default layout by this many degrees
Higher values = more shrinkage; use to control whitespace (or lack thereof) around figure. Mostly useful in 0.5 - 1.5 range.
Whether or not to scale ribbon widths to their frequency
Vector of 4 colors for coloring significance
Color(s) for gene segments. By default, they're colored randomly.
No return value. If 'save_name' is not provided, then the plot is printed to the current graphics device, otherwise a PDF is created at the given path.
library(MAFDash)
library(maftools)
maf <- system.file("extdata", "test.mutect2.maf.gz", package = "MAFDash")
generateRibbonPlot(read.maf(maf),save_name=paste0(tempdir(),"/ribbonPlot.pdf"))
#> -Reading
#> -Validating
#> -Silent variants: 561
#> -Summarizing
#> --Possible FLAGS among top ten genes:
#> MACF1
#> MUC16
#> -Processing clinical data
#> --Missing clinical data
#> -Finished in 0.218s elapsed (0.199s cpu)