Skip to contents

Creates an interactive GenomeSpy counterpart to maftools::gisticChromPlot(). Amplification scores grow upward, deletion scores grow downward, and a zoom-aware chromosome strip separates them.

Usage

gisticChromPlot(
  gistic = NULL,
  fdrCutOff = 0.1,
  markBands = NULL,
  color = NULL,
  ref.build = "hg19",
  txtSize = 0.8,
  cytobandTxtSize = 0.6,
  y_lims = NULL,
  chromosomeTrack = c("strip", "axis"),
  region = NULL,
  nonSignificantColor = NULL,
  annotations = NULL,
  width = NULL,
  height = NULL,
  elementId = NULL,
  annotationTracks = NULL
)

Arguments

gistic

A maftools GISTIC object created by maftools::readGistic().

fdrCutOff

GISTIC q-value cutoff in (0, 1] used to identify significant intervals.

markBands

Cytobands to label, "all" for every significant band, or NULL for the five bands with the lowest q-values.

color

Two colors for amplification and deletion. An unnamed vector is interpreted in that order; a named vector must contain Amp and Del.

ref.build

Reference assembly: "hg18", "hg19", or "hg38".

txtSize

Relative cytoband-label size.

cytobandTxtSize

Relative chromosome-label size.

y_lims

Optional two-element increasing range. Its largest absolute value sets the common amplification/deletion G-score limit.

chromosomeTrack

Chromosome context: "strip" draws the compact chromosome bar between the profiles; "axis" omits the bar and draws a regular genomic axis below the deletion profile. The latter is useful for inspecting a closely zoomed region.

region

Optional initial genomic region such as "chr21:39000000-41000000", or a chromosome such as "chr21". Commas and whitespace in coordinates are accepted. The endpoints may span chromosomes, for example "chr3:43393228-chr4:8534670". The plot remains zoomable.

nonSignificantColor

One color applied to both event types, or two colors for amplification and deletion intervals that do not pass fdrCutOff. An unnamed vector is interpreted in that order; a named vector must contain Amp and Del. With the default color, pale red and blue are used. If color is customized, the fallback is "lightgray" for both.

annotations

Optional data frame of custom genomic labels with columns chromosome, start, end, label, and event_type. Event type must be "Amp" or "Del". Labels are anchored to the highest overlapping G-score interval.

width, height

Widget dimensions.

elementId

Optional element ID.

annotationTracks

Optional named list of GRanges or data-frame interval tracks to show below the GISTIC profiles. Scores prioritize labels; the built-in mutglyph_gene_annotations() resource is one option.

Value

A MutGlyph htmlwidget.

Details

The common G-score domain makes amplification and deletion magnitudes directly comparable. Intervals passing fdrCutOff use color, and the remaining intervals use nonSignificantColor. Tooltips include score, q-value, frequency, amplitude, and genomic coordinates.

Examples

if (interactive()) {
  gistic <- maftools::readGistic(
    gisticDir = system.file("extdata", package = "maftools"),
    isTCGA = TRUE,
    verbose = FALSE
  )
  gisticChromPlot(gistic, markBands = "all")
}