visualizeRegion: Visualize Region

Description Usage Arguments Value Examples

View source: R/visualize.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
visualizeRegion(
  chrm,
  plt.beg,
  plt.end,
  betas,
  platform = c("EPIC", "HM450"),
  refversion = c("hg38", "hg19"),
  sample.name.fontsize = 10,
  heat.height = NULL,
  draw = TRUE,
  show.sampleNames = TRUE,
  show.samples.n = NULL,
  show.probeNames = TRUE,
  cluster.samples = FALSE,
  nprobes.max = 1000,
  na.rm = FALSE,
  dmin = 0,
  dmax = 1
)

Arguments

chrm

chromosome

plt.beg

begin of the region

plt.end

end of the region

betas

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

platform

EPIC or HM450

refversion

hg38 or hg19

sample.name.fontsize

sample name font size

heat.height

heatmap height (auto inferred based on rows)

draw

draw figure or return betas

show.sampleNames

whether to show sample names

show.samples.n

number of samples to show (default: all)

show.probeNames

whether to show probe names

cluster.samples

whether to cluster samples

nprobes.max

maximum number of probes to plot

na.rm

remove probes with all NA.

dmin

data min

dmax

data max

Value

graphics or a matrix containing the captured beta values

Examples

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

sesame documentation built on Nov. 15, 2020, 2:08 a.m.