Last data update: 2014.03.03

R: Visualize ChIP intensities along the chromosome
chipAlongChromR Documentation

Visualize ChIP intensities along the chromosome

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

## 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

  ### 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)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Ringo)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: RColorBrewer
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

Loading required package: Matrix
Loading required package: grid
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Ringo/chipAlongChrom.Rd_%03d_medium.png", width=480, height=480)
> ### Name: chipAlongChrom
> ### Title: Visualize ChIP intensities along the chromosome
> ### Aliases: chipAlongChrom plot,ExpressionSet,probeAnno-method
> ### Keywords: hplot
> 
> ### ** Examples
> 
>   ### 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)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>