chipAlongChrom: Visualize ChIP intensities along the chromosome

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/chipAlongChrom.R

Description

This function can visualize the array intensities from a ChIP chip experiment for a chromosomal region or the whole chromosome. It's based on the plotAlongChrom function from the package tilingArray, but provides a different visualization.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'ExpressionSet,probeAnno'
plot(x, y, ...)

chipAlongChrom(eSet,  probeAnno, chrom, xlim, ylim, 
 samples = NULL, paletteName = "Set2", colPal = NULL,
 ylab = "Fold change [log]", ipch = 16, ilwd = 3, ilty = 1,
 icex = 3, gff = NULL,
 featureExclude=c("chromosome", "nucleotide_match","insertion"),
 zeroLine = TRUE, sampleLegend = TRUE, sampleLegendPos = "topleft",
 featureLegend = FALSE, maxInterDistance = 200,  coord = NULL,
 highlight, main, ...)

Arguments

eSet

An expression set containing the (normalized) ChIP intensities, e.g. the result objects from functions preprocess and computeRunningMedians.

x

Corresponds to argument eSet when calling the S4 method

probeAnno

An object of class probeAnno holding genomic position, index and gene association of probes on array.

y

Corresponds to argument probeAnno when calling the S4 method

chrom

character; the chromosome to visualize

xlim

start and end genomic coordinates on the chromosome to visualize

ylim

minimum and maximum probe intensities for the plot, if missing (default) set to range(exprs(eSet))

samples

numeric; which samples from the eSet are to be shown. Default is to show all samples in the eSet,

paletteName

character; Name of the RColorBrewer palette to use for sample colors. If the number of samples is greater than the palette size, random colors are taken.

colPal

vector of colors to use for the sample intensities. This is alternative to the argument paletteName for specifying which colors to use.

ylab

character; label for the y-axis, passed on to the plotting function as ylab

ipch

plot character to use

icex

character expansion to use for plotting symbol

ilwd

line width of plotted data lines

ilty

line type of plotted data lines; passed on to par(lty).

gff

data frame containing annotation for genomic feature to be used to further annotate the plot.

featureExclude

character vector specifying the feature types in the data.frame gff that should not be shown in the plot

zeroLine

logical; should a dashed horizontal line at y=0 be put into the plot?

sampleLegend

logical; should a sample legend be put into the plot?

sampleLegendPos

character; where to put the sample legend; one of ‘topleft’ (default), ‘bottomleft’, ‘topright’, or ‘bottomrigth’

featureLegend

logical; should a feature legend be put beneath the plot?

maxInterDistance

numeric; only used when itype is either "r" or "u"; specifies the maximal distance up to which adjacent probe positions should be connected by a line.

coord

optional integer of length 2; can be used instead of xlim to specify the start and end coordinates of the genomic region to plot

highlight

optional list specifying a genomic region to be highlighted in the shown plot

main

optional main title for the plot; if not specified: the default is ‘Chromosome coordinate [bp]’

...

further parameters passed on to grid.polyline and grid.points

Value

invisible list of probe positions (element x) and probe levels (element y) in the selected genomic region.

Note

The S4 method is provided as a mere convenience wrapper.

When plotting a new ‘grid’ plot in an active x11 window that already contains a plot, remember to call grid.newpage() before.

Author(s)

Joern Toedling

See Also

ExpressionSet-class, probeAnno-class, grid.points, plotAlongChrom in package tilingArray

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  ### load data
  ringoExampleDir <- system.file("exData",package="Ringo")
  load(file.path(ringoExampleDir,"exampleProbeAnno.rda"))
  load(file.path(ringoExampleDir,"exampleX.rda"))

  ### show a gene that is well represented on this microarray
  plot(exampleX, exProbeAnno, chrom="9",
       xlim=c(34318000,34321000), ylim=c(-2,4), gff=exGFF)

  ### this should give you the same result as:
  chipAlongChrom(exampleX, chrom="9", xlim=c(34318000,34321000),
                 ylim=c(-2,4), probeAnno=exProbeAnno, gff=exGFF)

Ringo documentation built on Nov. 8, 2020, 5:34 p.m.