visualizeRegion: Visualize Region

View source: R/visualize.R

visualizeRegionR Documentation

Visualize Region

Description

The function takes a genomic coordinate (chromosome, start and end) and a beta value matrix (probes on the row and samples on the column). It plots the beta values as a heatmap for all probes falling into the genomic region. If 'draw=TRUE' the function returns the plotted grid graphics object. Otherwise, the selected beta value matrix is returned. 'cluster.samples=TRUE/FALSE' controls whether hierarchical clustering is applied to the subset beta value matrix.

Usage

visualizeRegion(
  chrm,
  beg,
  end,
  betas,
  platform = NULL,
  genome = NULL,
  draw = TRUE,
  cluster.samples = FALSE,
  na.rm = FALSE,
  nprobes.max = 1000,
  txn.types = "protein_coding",
  txn.font.size = 6,
  ...
)

Arguments

chrm

chromosome

beg

begin of the region

end

end of the region

betas

beta value matrix (row: probes, column: samples)

platform

EPIC, HM450, or MM285

genome

hg38, mm10, ..., will infer if not given. For additional mapping, download the GRanges object from http://zwdzwd.github.io/InfiniumAnnotation and provide the following argument ..., genome = sesameAnno_buildManifestGRanges("downloaded_file"),... to this function.

draw

draw figure or return betas

cluster.samples

whether to cluster samples

na.rm

remove probes with all NA.

nprobes.max

maximum number of probes to plot

txn.types

default to protein_coding, use NULL for all

txn.font.size

transcript name font size

...

additional options, see assemble_plots

Value

graphics or a matrix containing the captured beta values

Examples

betas <- sesameDataGet('HM450.76.TCGA.matched')$betas
visualizeRegion('chr20', 44648623, 44652152, betas, 'HM450')

zwdzwd/sesame documentation built on June 24, 2024, 6:34 p.m.