Learn R Programming

genoset (version 1.28.2)

genoPlot: Plot data along the genome

Description

Plot location data and chromosome boundaries from a GenoSet or GRanges object against data from a numeric or Rle. Specifying a chromosome name and optionally a 'xlim' will zoom into one chromosome region. If more than one chromosome is present, the chromosome boundaries will be marked. Alternatively, for a numeric x and a numeric or Rle y, data in y can be plotted at genome positions x. In this case, chromosome boundaries can be taken from the argument locs. If data for y-axis comes from a Rle lines are plotted representing segments. X-axis tickmarks will be labeled with genome positions in the most appropriate units.

Usage

genoPlot(x, y, ...)

## S3 method for class 'numeric,numeric': genoPlot(x, y, add = FALSE, xlab = "", ylab = "", col = "black", locs = NULL, ...)

## S3 method for class 'numeric,Rle': genoPlot(x, y, add = FALSE, xlab = "", ylab = "", col = "red", locs = NULL, lwd = 2, xlim = NULL, ...)

## S3 method for class 'GenoSetOrGenomicRanges,ANY': genoPlot(x, y, chr = NULL, add = FALSE, pch = ".", xlab = "", ylab = "", ...)

Arguments

x
GenoSet (or descendant) or GRanges
y
numeric or Rle
...
Additional plotting args
add
Add plot to existing plot
xlab
character, label for x-axis of plot
ylab
character, label for y-axis of plot
col
character, color to plot lines or points
locs
GRanges, like rowRanges slot of GenoSet
lwd
numeric, line width for segment plots from an Rle
xlim
integer, length two, bounds for genome positions. Used in conjunction with "chr" to subset data for plotting.
chr
Chromosome to plot, NULL by default for full genome
pch
character or numeric, printing character, see points

Value

  • TRUE

See Also

Other "genome plots": genomeAxis

Examples

Run this code
data(genoset,package="genoset")
genoPlot( x=genoset.ds,y=genoset.ds[,1,"lrr"] )
genoPlot( genoPos(genoset.ds), genoset.ds[,1,"lrr"], locs=rowRanges(genoset.ds) ) # The same
genoPlot( 1:10, Rle(c(rep(0,5),rep(3,4),rep(1,1))) )

Run the code above in your browser using DataLab